[Execute if] Testing for custom naming text components are order dependent
Testing for custom item names depend heavily on the placement of the text components.
Example:
When testing for an item named "Sun's Cowl" with no italics
This doesn't work:
/execute as @a if data entity @s Inventory[{Slot:103b,id:"minecraft:player_head",components:{"minecraft:custom_name":'{"text":"Sun\'s Cowl","italic":false}'}}] run say @s
But this does:
/execute as @a if data entity @s Inventory[{Slot:103b,id:"minecraft:player_head",components:{"minecraft:custom_name":'{"italic":false,"text":"Sun\'s Cowl"}'}}] run say @s
Desired result:
Testing for the components won't matter where the same components were placed
2024-11-08, 02:58 AM
2024-11-08, 09:37 PM
2024-11-08, 09:37 PM
0
0
-