To Reproduce:
Create a resource pack with an item definition that replaces something vanilla - in my case, I used the Enchantment Book.
Using the
component
condition, check for something via a tag that doesn’t exist (note that creating the tag in a Datapack will actually prevent this from happening)The game crashes upon entering a world.
Error: java.lang.UnsupportedOperationException: Tag TagKey[minecraft:enchantment / minecraft:doesnt_exist] can't be dereferenced during construction
Expected:
Either the resource pack wouldn’t load, the item definition wouldn’t load, or it would enter in a “safe mode“ similar to broken definitions in a Datapack.
I could see this being very dangerous, since friends could send packs that crash the game or servers who are configured to send a resource pack may purposefully or accidentally crash their players.
Environment
1.21.5-rc1, Windows 10
The resource pack doesn’t seem to crash for me in the latest version of the game. Are you still able to reproduce it in the latest snapshot?