I just found out that Minecraft supports coding custom functions, sounds like fun. The guides I find show many different file structures over time. The latest I find for version 1.15.2 is below, but nonfunctional. Is it still correct?
.minecraft -> saves -> World -> datapacks -> RandomFolderName -> data -> namespace -> functions -> myfunc.mcfunction
That's the correct file structure. Does your function show up in the autocomplete menu when you type /function and press space? if not, that means there is an error in your function.
No it doesn't show up. In fact no functions show up at all, although I use command blocks in the world already. My function is just this below for a test
give @p diamond
I saved as test.mcfunction using a code editor and UTF-8
I just found out that Minecraft supports coding custom functions, sounds like fun. The guides I find show many different file structures over time. The latest I find for version 1.15.2 is below, but nonfunctional. Is it still correct?
.minecraft -> saves -> World -> datapacks -> RandomFolderName -> data -> namespace -> functions -> myfunc.mcfunction
and called it in-game with
/functions namespace:myfunc
-all I get is "Unknown function"..
p.s. pack.mcmeta is in datapacks
That's the correct file structure. Does your function show up in the autocomplete menu when you type /function and press space? if not, that means there is an error in your function.
Command block engineer // Developer // #TeamTrees
Thanks for replying
No it doesn't show up. In fact no functions show up at all, although I use command blocks in the world already. My function is just this below for a test
Have you use /reload in minecraft? If you modify your function when on the game, it'll not be working until you use /reload
I like trains... OF CHAIN COMMAND BLOCKS !
Yes, I do it before trying the function. Does the file need anything besides the command? Maybe a header?
I wonder if someone would share a World file with working functions that I can load.
Oh I know! Maybe you don't have pack.mcmeta !
Saves\world_name\datapacks\your_datapack\pack.mcmeta
And within you have
{
"pack": {
"pack_format": 5,
"description": "description"
}
}
I like trains... OF CHAIN COMMAND BLOCKS !
omg, that was it. I just had pack.mcmeta in the wrong folder! Thanks!