-
Bug
-
Resolution: Invalid
-
None
-
1.21
-
None
-
OS: Linux Mint 20.2
Java Version: 21
-
Community Consensus
-
Commands
summary
"!" operator used outside of the root components field displays inconsistent behavior with its use in the root components field
steps to reproduce
1. run command:
/give @s amethyst_shard[custom_data={"some_custom_data":{}}]
2. hold the amethyst shard in your main hand
3. run command:
/item modify entity @s weapon.mainhand [{"function":"minecraft:set_components","components":{"minecraft:custom_data":{"!some_custom_data":{}}}}]
4. run command:
/data get entity @s SelectedItem
expected result
item's "custom data" field should either:
- be empty, if "!" operator is permitted inside of another component
- contain both "some_custom_data" and "!some_custom_data" if operator is not permitted inside of another component
actual result
item's "custom data" field contains only "!some_custom_data", as if the relevant tag were removed, but the tag signalling to remove that tag were also added.