mojira.dev
MC-297364

Referencing custom tag in item model component predicate causes crash when viewing on other worlds

If an item model is created in a resource pack using a component predicate (say, minecraft:enchantments) involving a custom tag (say, an enchantment tag added in a data pack), and then the item model is rendered in a world not containing that data pack, the game crashes.

Steps to Reproduce:

  1. Download the file “item_model_crash_test.zip“ below and put it in your “resourcepacks” folder.

  2. Load a world and apply the resource pack.

  3. Run this command:

    /give @s minecraft:carrot[minecraft:item_model="test:item_model_crash_test"]

Expected Behavior:

The game functions properly and the item renders as a poisonous potato, as dictated by the item model file in the resource pack.

Actual Behavior:

The game crashes because the enchantment tag referenced in the item model file does not exist.

Attachments

Comments 0

No comments.

KaptainQrazyKool

(Unassigned)

Confirmed

Platform

Normal

Crash

1.21.5, 25w18a, 1.21.6 Pre-Release 3

Retrieved