mojira.dev
MC-304242

The "component" property of the "select" model type always uses the fallback model when "custom_data" is the component being checked

When setting up an item model override (<pack_name>/assets/minecraft/items/ender_eye.json) I noticed that the custom_data doesn’t attempt to read at all. When I change the item model to read the custom_model_data, that works fine.

Reproduce the issue:

  1. Enable the attached resource pack.

  2. Execute the following command:

/give @p ender_eye[custom_data:{cmd:1}]

Expected Result:

An ender eye with the oak log’s model (since this resource pack changes the model to the oak log model with cmd:1 as custom data).

Actual Result:

An ender eye with the default model.

Files attached:

Current Resource pack I’m working with (cob_zombies)

Screenshot of the output

Linked issues

Attachments

Comments 4

Thank you for your report!
We're tracking this issue in MC-279557, so this ticket is being resolved and linked as a duplicate.

That ticket has already been resolved as invalid. Please take a look at the parent ticket (MC-279557) and see if an explanation is provided there in the description of the ticket or in the comments for why this issue is invalid.

If you haven't already, you might like to make use of the search feature to see if the issue has already been mentioned.

Quick Links:
📓 Bug Tracker Guidelines – 💬 Community Support – 📧 Mojang Support (Technical Issues) – 📧 Microsoft Support (Account Issues)
📓 Project Summary – ✍️ Feedback and Suggestions – 📖 Game Wiki

This was not resolved, and the attached ticket is for a different version. I am stating that it doesn’t work AT ALL. The attached ticket states that it doesn’t work with additional tags

Apologies for the misunderstanding. I have now reopened and confirmed the report. Please note, however, that when the status of your report is “resolved”, that does not mean your problem in the game is fixed. It just means that your report is closed for being invalid, a duplicate, fixed or awaiting a response from you. You need to check the resolution (e.g. “Your request status has changed to Resolved with resolution Duplicate.”) to see why your report has been resolved in each case.

JSON data is parsed into the smallest number type possible. That means in your example, you are checking {cmd:1} (from the item) against {cmd:1b} (from the model). The model definition supports SNBT, so in your model you can write the case as "when": "{cmd:1b}", which is the intended way to solve these type issues. A different solution would be to define the type within the custom data component itself: ender_eye[custom_data={cmd:1b}].

Xavier Bennett

(Unassigned)

Confirmed

Platform

Normal

Items, Resource Packs

1.21.10, 25w46a

Retrieved