Multiple component entries with the same key cause item deletion
Setup:
Place down a shulker box and put a diamond sword with sharpness in it.
Then run the following command:
/data modify block x y z Items[0].components.enchantments.levels."minecraft:sharpness" set value 1
What's supposed to happen:
If the item already has that component, it will overwrite its value, in this case setting the sword's sharpness level to 1.
What happens instead:
The game tries to add a second component with the same name ("minecraft:sharpness"), causing it to glitch out and remove the item entirely.
(Edit: Not quite correct. As elaborated in my comment, it's caused by using the flat name instead of using "minecraft:...". For some reason, it's possible to use it for creating a component entry, but not for checking or modifying)
2024-02-28, 05:57 PM
2024-03-23, 07:46 PM
2024-03-23, 09:36 AM
2
1
-