-
Bug
-
Resolution: Invalid
-
None
-
24w33a, 1.21.1
-
None
-
Unconfirmed
-
Data Packs, Enchantments
My datapack says that it has errors and won't load if I block specifically sharpness. The other ones work fine.
What I expected to happen was...:
I was testing something you can do in the pack.mcmeta, where you can block certain files from the game loading, which is commonly used for removing recipes, but I tested it out, and you can block enchantments too. I tried that, and I succesfully blocked the knockback enchantment and the impaling enchantment with no issues.
I expected the same to happen for sharpness. I assumed that it would disappear from all items enchanted with sharpness previously, and it wouldn't show up for the /enchant command.
What actually happened was...:
What actually happened, was that upon loading my world again, it said:
Errors in currently selected data packs prevented the world from loading. You can either try to load it with only the vanilla data pack ("safe mode"), or go back to the title screen and fix it manually
(I attached a screenshot of this screen.)
This usually happens when my datapack has errors in a .json file, however, this should work? I've triple checked I spelled everything correct, and what's also weird, is that if I try blocking a non-existent enchantment, you won't get any error. I tried blocking the "gumdrop" enchantment and it loaded just fine
Steps to Reproduce:
1. Create the datapack. You can do this by going into the "datapacks" folder, and create another folder inside it. You can call it anything, as long as it has no capitals, and no spaces. I named mine "bug_report".
2. Create a file named "pack.mcmeta"
3. In that file, type this:
{ "pack": { "pack_format": 48, "description": "this is for a bug_report" }, "filter": { "block": [ { "namespace": "minecraft", "path": "enchantment/sharpness.json" } ] } }
4. Open the world. You should get that same error screen that I did.
And if you'd like to test it out, go back to your pack.mcmeta folder and replace "enchantment/sharpness.json" with "enchantment/knockback.json" or any other enchantment, and you will not get an error. I haven't tested every single enchantment, you can do so if you want.
I've attached the datapack that breaks.