-
Bug
-
Resolution: Unresolved
-
None
-
Minecraft 1.13, 20w51a, 21w06a, 1.21.1, 24w37a, 1.21.4 Pre-Release 1
-
None
-
Windows 10
Java 9.0.4
-
Community Consensus
-
Commands
I spawned in one pig, and ran the following commands as a test of adding/remove NBT data, specifically modifiers on mobs:
/data merge entity @e[limit=1,type=minecraft:pig] {Attributes:[{Name:"generic.armor",Modifiers:[{UUIDMost:4321,UUIDLeast:1234,Amount:1.0d,Operation:0,Name:"test_armor"}]}]}
This is to add a modifier of 1 extra armor to a pig.
I tried the following to remove said Modifier, but none worked. (note, the 4th entry in the list of attributes is the base armor attribute, so it is not arbitrary)
/data remove entity @e[limit=1,type=minecraft:pig] Attributes[3].Modifiers /data remove entity @e[limit=1,type=minecraft:pig] Attributes[3].Modifiers[0] /data remove entity @e[limit=1,type=minecraft:pig] Attributes[3]
None of these had any effect on updating or removing the Modifier. The only possible work around I have found is modifying the values using a merge that either knows the exact index (not really efficient if in command blocks / function file), or using a pair of the UUIDs and Name to set the amount to 0 (Also not what I would like to do, as that would mess with UUID unique pairing).
The expected outcome is that just the modifier will be removed from the NBT data for the armor attribute.
- relates to
-
MC-122008 custom_potion_effects in arrow entities duplicates with '/execute store' and isn't affected by '/data remove'
- Open
-
MC-153392 Unable to remove villager gossips using /data remove
- Open
-
MC-122840 "/data remove" cannot delete beam_target tag in End Crystals
- Reopened
-
MC-128225 '/data remove' can't remove the NBT "CustomName"
- Resolved
-
MC-138100 /data remove doesn't work for the Jukebox's RecordItem tag
- Resolved