Custom Enchantment to call a function.
I want to create a custom enchantment, which calls a function when the player's location chanced. My enchantment file:
{ "anvil_cost": 1, "description": "Heat", "effects": { "minecraft:location_changed": [ { "effect": { "type": "minecraft:run_function", "function": "scaui:spawn_fire" } } ] }, "max_cost": { "base": 5, "per_level_above_first": 2 }, "min_cost": { "base": 1, "per_level_above_first": 1 }, "max_level": 1, "slots": [ "feed" ], "supported_items": "minecraft:iron_boots", "weight": 1 }I'am using Minecraft 24w21b . The pack's version is 45. Is it right?
When I'am trying to start my world using this datapack, I'll revive an error something like "Can't load datapack. It's invalid". How can I fix this problem?