"minecraft:" sometimes required for key name in data merge
How to reproduce
- Place an item frame with an item in it
- Run the following command
/data merge entity @e[type=item_frame,sort=nearest,limit=1] {Item: {components:{"custom_name": '{"text":"Hello"}'}}}
Notice that the item was given the custom name as expected- Run the following command to change the custom name
/data merge entity @e[type=item_frame,sort=nearest,limit=1] {Item: {components:{"custom_name": '{"text":"World!"}'}}}
The item wasn't renamed, the command silently failed, and an error was logged to the console
[00:45:25] [Server thread/ERROR]: Tried to load invalid item: 'Duplicate entry for key: 'b[type=minecraft:custom_name, removed=false]' missed input: {custom_name:'{"text":"World!"}'}'
- Now run the following command to rename the item, including the minecraft: prefix
/data merge entity @e[type=item_frame,sort=nearest,limit=1] {Item: {components:{"minecraft:custom_name": '{"text":"World!"}'}}}
Notice that this worked
2024-03-11, 07:51 AM
2024-03-14, 10:13 PM
2024-03-14, 08:10 AM
1
2
-