Search code examples
minecraftminecraft-commands

load.mcfunction does not get call in minecraft 1.21


I was following this tutorial to learn how to make data packs in Minecraft. I'm playing Minecraft 1.21. Here's my data pack architecture: my data pack architecture. I'm at the part of the tutorial where he creates and executes the load.mcfunction file. I followed the steps exactly, but my load function doesn't execute.

Here's the code in my load.mcfunction file:

# This runs on /reload command

tellraw @a {"text": "Datapack loaded!"}

And here's my load.json file:

{ 
  "values": [ 
      "namespace:load" 
  ] 
}

I'd be grateful if someone could help me solve this problem. I haven't been able to find a solution myself.


Solution

  • in 1.21 they changed some of the file path names they require. all you have to do is change the "functions" folder names to "function", singular, and it should all work again.

    Also, so you don't forget, your version number for the pack.mcmeta file should be 48 since you're in 1.21.