-
Bug
-
Resolution: Unresolved
-
None
-
Minecraft 17w47a, Minecraft 17w47b, Minecraft 17w48a, Minecraft 17w50a, Minecraft 18w01a, Minecraft 18w03b, Minecraft 18w21a, Minecraft 18w21b, Minecraft 1.13-pre1, Minecraft 1.13-pre2, Minecraft 1.13-pre3, Minecraft 1.13-pre4, Minecraft 1.13-pre5, Minecraft 1.13-pre6, Minecraft 1.13-pre7, Minecraft 1.13, Minecraft 18w31a, Minecraft 1.13.1, 1.15.2, 20w17a, 20w21a, 1.16.4, 20w48a, 1.17.1, 22w46a, 1.19.3, 23w05a, 1.19.4, 1.20.2, 1.20.4
-
Confirmed
-
Data Packs
-
Low
-
Platform
The bug
When using the /execute store command on a tipped arrow with custom potion effects, rather than replacing the respective NBT, it will duplicate the field first, THEN replace the respective NBT in the new field.
How to reproduce
- Summon an arrow with custom_potion_effects NBT data:
/summon arrow ~ ~ ~ {custom_potion_effects:[{ambient:0b,show_particles:1b,duration:1200,id:"minecraft:luck",amplifier:1b}]}
- Run an example execute store command:
/execute store success entity @e[limit=1,type=arrow] custom_potion_effects[0].duration int 1 run say store
- Using /data get on the entity results in duplicate entries:
/data get entity @e[type=arrow,limit=1] custom_potion_effects
ResultArrow has the following entity data: [{duration: 1200, show_icon: 1b, amplifier: 1b, ambient: 0b, id: "minecraft:luck", show_particles: 1b}, {duration: 1, show_icon: 1b, amplifier: 1b, ambient: 0b, id: "minecraft:luck", show_particles: 1b}]
Using /data remove doesn't seem to modify the custom_potion_effects tag at all.
/data remove entity @e[limit=1,type=arrow] custom_potion_effects[0]
using this and then /data get gives the same results as listed above.
Code analysis
Code analysis by Chixvv can be found in this comment.
- relates to
-
MC-153392 Unable to remove villager gossips using /data remove
- Open
-
MC-107941 Shooting, summoning or editing an arrow and reloading the world gives potion particles
- Resolved
-
MC-248264 /data remove can't remove ArmorItems
- Resolved
-
MC-135044 /data remove cannot remove attribute (modifier)s
- Open
-
MC-112826 data command duplicates villager and piglin inventories
- Resolved
-
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
-
MC-179815 Data command doesn't remove leash from a mob
- Resolved