5

I am trying to make a function in Minecraft 1.14.2, and it just doesn't work. I tried everything and looked for answers everywhere, but it still doesn't work. I did the following:

  • created a .mcfunction file in \<myWorldName>\datapacks\<dataPackName>\data\<nameSpace>\functions;
  • saved it in UTF-8 without BOM (using Notepad++), and later tried ANSI;
  • did /reload and then /function <nameSpace>:<functionName>. It always just writes "Unknown function <functionName>". It didn't work a single time.

My function file is very simple, I just try to test it with something like:

say 123

I really don't know what to do next, please, can you help me?

2
  • Check that your function's name doesn't have any reserved characters. Try making that example function be named example.mcfunction, because I'm pretty sure capital letters and certain punctuations are off limits.
    – Nik3141
    May 30, 2019 at 22:38
  • Name of my function was test.mcfunction so it wasn't because of punctuation or capital letters.
    – 0xVector
    May 31, 2019 at 21:25

1 Answer 1

5

You also need "pack.mcmeta" in your <datapackName> folder. The wiki tells you what that can all contain, but the simplest case is just:

{"pack":{"pack_format":3,"description":""}}
1
  • I had that file there but it was slightly different. Your version made it work. Thank you very much!
    – 0xVector
    May 31, 2019 at 21:22

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .