-
Bug
-
Resolution: Invalid
-
None
-
25w03a
-
None
-
Confirmed
-
Resource Packs
Description:
Item model minecraft:component select property can't check individual values inside of the minecraft:custom_data component
Expected Result:
The following item model should change the model of a golden sword when minecraft:custom_data contains {id:"COOL_SWORD"}, regardless of other data inside of minecraft:custom_data. (Similar to how /execute if data works)
{ "model": { "type": "select", "property": "component", "component": "custom_data", "fallback": { "type": "model", "model": "item/golden_sword" }, "cases": [ { "when": "{id:\"COOL_SWORD\"}", "model": { "type": "model", "model": "item/cool_sword" } } ] } }
Actual Result:
The entire component is checked instead of just the specified data
Steps to Reproduce:
1. Enable the attached resource pack
2. Run the following command:
/give @s minecraft:golden_sword[minecraft:custom_data={id:"COOL_SWORD"}]
3. Notice the model is applied properly to the item
4. Run the following command:
/give @s minecraft:golden_sword[minecraft:custom_data={id:"COOL_SWORD",extra_data:"yes"}]
5. Notice the model is not applied to the item
6. Drop the item without the custom model on the ground
7. Run the following command:
/execute if data entity @n[type=minecraft:item] {Item:{components:{"minecraft:custom_data":{id:"COOL_SWORD"}}}}
8. Notice the test passes