custom_potion_effects in arrow entities duplicates with '/execute store' and isn't affected by '/data remove'
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 Dl can be found in this comment.
Linked Issues
relates to8
Created Issue:
/execute store duplicates CustomPotionEffects in arrow entities
when using the /execute store command on a tipped arrow with custom potion effects, rather than replace the respective nbt, it will set duplicate the field first, THEN replace the respective nbt in the new field.
Example command:/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_events(Use attached photo as reference)
when using the /execute store command on a tipped arrow with custom potion effects, rather than replace the respective nbt, it will set duplicate the field first, THEN replace the respective nbt in the new field.
Example command:/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_events
(Use attached photo as reference)when using the /execute store command on a tipped arrow with custom potion effects, rather than replace the respective nbt, it will set duplicate the field first, THEN replace the respective nbt in the new field.
Example command:/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_eventsusing /data get on the entity results in:
Arrow has the following entity data: {damage: 2.0d, shake: 0b, xTile: 14, Invulnerable: 0b, PortalCooldown: 0, life: 45s, FallDistance: 0.0f, inTile: "minecraft:grass", CustomPotionEffects: [{Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b}, {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b}], zTile: -20, yTile: 3, Tags: ["enigmaticarrow", "foundenigmatic"], Motion: [-0.5928755614649219d, -0.7390669544854376d, -1.695712285879523d], UUIDLeast: -6984840334222717433L, inGround: 1b, Color: 3552822, pickup: 2b, Air: 300s, OnGround: 0b, Dimension: 0, Rotation: [-160.72876f, -20.094564f], UUIDMost: 570361438094378310L, inData: 0b, crit: 0b, Pos: [14.51067827428319d, 4.01790721023637d, -19.59053021206013d], Fire: -1s}
when using the /execute store command on a tipped arrow with custom potion effects, rather than replace the respective nbt, it will set duplicate the field first, THEN replace the respective nbt in the new field.
Example command:/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_eventsusing /data get on the entity results in:
Arrow has the following entity data: {damage: 2.0d, shake: 0b, xTile: 14, Invulnerable: 0b, PortalCooldown: 0, life: 45s, FallDistance: 0.0f, inTile: "minecraft:grass", *CustomPotionEffects: [{Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b}, {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b}]*, zTile: -20, yTile: 3, Tags: ["enigmaticarrow", "foundenigmatic"], Motion: [-0.5928755614649219d, -0.7390669544854376d, -1.695712285879523d], UUIDLeast: -6984840334222717433L, inGround: 1b, Color: 3552822, pickup: 2b, Air: 300s, OnGround: 0b, Dimension: 0, Rotation: [-160.72876f, -20.094564f], UUIDMost: 570361438094378310L, inData: 0b, crit: 0b, Pos: [14.51067827428319d, 4.01790721023637d, -19.59053021206013d], Fire: -1s}
when using the /execute store command on a tipped arrow with custom potion effects, rather than replace the respective nbt, it will set duplicate the field first, THEN replace the respective nbt in the new field.
Example command:/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_eventsusing /data get on the entity results in:
Arrow has the following entity data: {damage: 2.0d, shake: 0b, xTile: 14, Invulnerable: 0b, PortalCooldown: 0, life: 45s, FallDistance: 0.0f, inTile: "minecraft:grass", *CustomPotionEffects: [{Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b}, {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b}]*, zTile: -20, yTile: 3, Tags: ["enigmaticarrow", "foundenigmatic"], Motion: [-0.5928755614649219d, -0.7390669544854376d, -1.695712285879523d], UUIDLeast: -6984840334222717433L, inGround: 1b, Color: 3552822, pickup: 2b, Air: 300s, OnGround: 0b, Dimension: 0, Rotation: [-160.72876f, -20.094564f], UUIDMost: 570361438094378310L, inData: 0b, crit: 0b, Pos: [14.51067827428319d, 4.01790721023637d, -19.59053021206013d], Fire: -1s}when using the /execute store command on a tipped arrow with custom potion effects, rather than replace the respective nbt, it will set duplicate the field first, THEN replace the respective nbt in the new field.
Example command:/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_eventsusing /data get on the entity results in:
Arrow has the following entity data: {damage: 2.0d, shake: 0b, xTile: 14, Invulnerable: 0b, PortalCooldown: 0, life: 45s, FallDistance: 0.0f, inTile: "minecraft:grass", *CustomPotionEffects: [
{Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b},
{Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b}]*, zTile: -20, yTile: 3, Tags: ["enigmaticarrow", "foundenigmatic"], Motion: [-0.5928755614649219d, -0.7390669544854376d, -1.695712285879523d], UUIDLeast: -6984840334222717433L, inGround: 1b, Color: 3552822, pickup: 2b, Air: 300s, OnGround: 0b, Dimension: 0, Rotation: [-160.72876f, -20.094564f], UUIDMost: 570361438094378310L, inData: 0b, crit: 0b, Pos: [14.51067827428319d, 4.01790721023637d, -19.59053021206013d], Fire: -1s}
when using the /execute store command on a tipped arrow with custom potion effects, rather than replace the respective nbt, it will set duplicate the field first, THEN replace the respective nbt in the new field.
Example command:/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_eventsusing /data get on the entity results in:
Arrow has the following entity data: {damage: 2.0d, shake: 0b, xTile: 14, Invulnerable: 0b, PortalCooldown: 0, life: 45s, FallDistance: 0.0f, inTile: "minecraft:grass", *CustomPotionEffects: [
{Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b},
{Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b}]* , zTile: -20, yTile: 3, Tags: ["enigmaticarrow", "foundenigmatic"], Motion: [-0.5928755614649219d, -0.7390669544854376d, -1.695712285879523d], UUIDLeast: -6984840334222717433L, inGround: 1b, Color: 3552822, pickup: 2b, Air: 300s, OnGround: 0b, Dimension: 0, Rotation: [-160.72876f, -20.094564f], UUIDMost: 570361438094378310L, inData: 0b, crit: 0b, Pos: [14.51067827428319d, 4.01790721023637d, -19.59053021206013d], Fire: -1s}
when using the /execute store command on a tipped arrow with custom potion effects, rather than replace the respective nbt, it will set duplicate the field first, THEN replace the respective nbt in the new field.
Example command:/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_eventsusing /data get on the entity results in:
Arrow has the following entity data: {damage: 2.0d, shake: 0b, xTile: 14, Invulnerable: 0b, PortalCooldown: 0, life: 45s, FallDistance: 0.0f, inTile: "minecraft:grass", *CustomPotionEffects: [
{Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b},
{Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b}]* , zTile: -20, yTile: 3, Tags: ["enigmaticarrow", "foundenigmatic"], Motion: [-0.5928755614649219d, -0.7390669544854376d, -1.695712285879523d], UUIDLeast: -6984840334222717433L, inGround: 1b, Color: 3552822, pickup: 2b, Air: 300s, OnGround: 0b, Dimension: 0, Rotation: [-160.72876f, -20.094564f], UUIDMost: 570361438094378310L, inData: 0b, crit: 0b, Pos: [14.51067827428319d, 4.01790721023637d, -19.59053021206013d], Fire: -1s}
when using the /execute store command on a tipped arrow with custom potion effects, rather than replace the respective nbt, it will set duplicate the field first, THEN replace the respective nbt in the new field.
Example command:/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_eventsusing /data get on the entity results in:
Arrow has the following entity data: {damage: 2.0d, shake: 0b, xTile: 14, Invulnerable: 0b, PortalCooldown: 0, life: 45s, FallDistance: 0.0f, inTile: "minecraft:grass", CustomPotionEffects: [{Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b}, {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b}], zTile: -20, yTile: 3, Tags: ["enigmaticarrow", "foundenigmatic"], Motion: [-0.5928755614649219d, -0.7390669544854376d, -1.695712285879523d], UUIDLeast: -6984840334222717433L, inGround: 1b, Color: 3552822, pickup: 2b, Air: 300s, OnGround: 0b, Dimension: 0, Rotation: [-160.72876f, -20.094564f], UUIDMost: 570361438094378310L, inData: 0b, crit: 0b, Pos: [14.51067827428319d, 4.01790721023637d, -19.59053021206013d], Fire: -1s}
/execute store duplicatesCustomPotionEffects in arrow entitiesCustomPotionEffects in arrow entities duplicates with /execute store and isn't affected by /data remove
when using the /execute store command on a tipped arrow with custom potion effects, rather than replace the respective nbt, it will set duplicate the field first, THEN replace the respective nbt in the new field.
Example command:/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_eventsusing /data get on the entity results in:
Arrow has the following entity data: {damage: 2.0d, shake: 0b, xTile: 14, Invulnerable: 0b, PortalCooldown: 0, life: 45s, FallDistance: 0.0f, inTile: "minecraft:grass", CustomPotionEffects: [{Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b}, {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b}], zTile: -20, yTile: 3, Tags: ["enigmaticarrow", "foundenigmatic"], Motion: [-0.5928755614649219d, -0.7390669544854376d, -1.695712285879523d], UUIDLeast: -6984840334222717433L, inGround: 1b, Color: 3552822, pickup: 2b, Air: 300s, OnGround: 0b, Dimension: 0, Rotation: [-160.72876f, -20.094564f], UUIDMost: 570361438094378310L, inData: 0b, crit: 0b, Pos: [14.51067827428319d, 4.01790721023637d, -19.59053021206013d], Fire: -1s}Using /data remove doesn't seem to modify the CustomPotionEffects tag at all.
/data remove entity @e[limit=1,type=arrow] CustomPotionEffects[0]using this and then /data get gives the same results as listed here.
when using the /execute storecommand on a tipped arrow with custom potion effects, rather than replace the respectivenbt, it will set duplicate the field first, THEN replace the respectivenbtin the new field.
Example command:/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_eventsusing /data get on the entity results in:
Arrow has the following entity data: {damage: 2.0d, shake: 0b, xTile: 14, Invulnerable: 0b, PortalCooldown: 0, life: 45s, FallDistance: 0.0f, inTile: "minecraft:grass", CustomPotionEffects: [{Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b}, {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b}], zTile: -20, yTile: 3, Tags: ["enigmaticarrow", "foundenigmatic"], Motion: [-0.5928755614649219d, -0.7390669544854376d, -1.695712285879523d], UUIDLeast: -6984840334222717433L, inGround: 1b, Color: 3552822, pickup: 2b, Air: 300s, OnGround: 0b, Dimension: 0, Rotation: [-160.72876f, -20.094564f], UUIDMost: 570361438094378310L, inData: 0b, crit: 0b, Pos: [14.51067827428319d, 4.01790721023637d, -19.59053021206013d], Fire: -1s}Using /data remove doesn't seem to modify the CustomPotionEffects tag at all.
/data remove entity @e[limit=1,type=arrow] CustomPotionEffects[0]using this and then /data get gives the same results as listed here.
The bug
When using the /execute store command on a tipped arrow with custom potion effects, rather than replace the respective NBT, it will set duplicate the field first, THEN replace the respective NBT in the new field.
How to reproduce
Example command:
/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_eventsusing /data get on the entity results in:
Arrow has the following entity data: {damage: 2.0d, shake: 0b, xTile: 14, Invulnerable: 0b, PortalCooldown: 0, life: 45s, FallDistance: 0.0f, inTile: "minecraft:grass", CustomPotionEffects: [{Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b}, {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b}], zTile: -20, yTile: 3, Tags: ["enigmaticarrow", "foundenigmatic"], Motion: [-0.5928755614649219d, -0.7390669544854376d, -1.695712285879523d], UUIDLeast: -6984840334222717433L, inGround: 1b, Color: 3552822, pickup: 2b, Air: 300s, OnGround: 0b, Dimension: 0, Rotation: [-160.72876f, -20.094564f], UUIDMost: 570361438094378310L, inData: 0b, crit: 0b, Pos: [14.51067827428319d, 4.01790721023637d, -19.59053021206013d], Fire: -1s}Using /data remove doesn't seem to modify the CustomPotionEffects tag at all.
/data remove entity @e[limit=1,type=arrow] CustomPotionEffects[0]using this and then /data get gives the same results as listed here.
CustomPotionEffects in arrow entities duplicates with '/execute store' and isn't affected by '/data remove'
The bug
When using the /execute store command on a tipped arrow with custom potion effects, rather than replace the respective NBT, it will
setduplicate the field first, THEN replace the respective NBT in the new field.How to reproduce
Example command:
/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_eventsusing /data get on the entity results in:
Arrow has the following entity data: {damage: 2.0d, shake: 0b, xTile: 14, Invulnerable: 0b, PortalCooldown: 0, life: 45s, FallDistance: 0.0f, inTile: "minecraft:grass", CustomPotionEffects: [{Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b}, {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b}], zTile: -20, yTile: 3, Tags: ["enigmaticarrow", "foundenigmatic"], Motion: [-0.5928755614649219d, -0.7390669544854376d, -1.695712285879523d], UUIDLeast: -6984840334222717433L, inGround: 1b, Color: 3552822, pickup: 2b, Air: 300s, OnGround: 0b, Dimension: 0, Rotation: [-160.72876f, -20.094564f], UUIDMost: 570361438094378310L, inData: 0b, crit: 0b, Pos: [14.51067827428319d, 4.01790721023637d, -19.59053021206013d], Fire: -1s}Using /data remove doesn't seem to modify the CustomPotionEffects tag at all.
/data remove entity @e[limit=1,type=arrow] CustomPotionEffects[0]using this and then /data get gives the same results as listed here.
The bug
When using the /execute store command on a tipped arrow with custom potion effects, rather than replace the respective NBT, it will duplicate the field first, THEN replace the respective NBT in the new field.
How to reproduce
Example command:
/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_eventsusing /data get on the entity results in:
Arrow has the following entity data: {damage: 2.0d, shake: 0b, xTile: 14, Invulnerable: 0b, PortalCooldown: 0, life: 45s, FallDistance: 0.0f, inTile: "minecraft:grass", CustomPotionEffects: [{Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b}, {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b}], zTile: -20, yTile: 3, Tags: ["enigmaticarrow", "foundenigmatic"], Motion: [-0.5928755614649219d, -0.7390669544854376d, -1.695712285879523d], UUIDLeast: -6984840334222717433L, inGround: 1b, Color: 3552822, pickup: 2b, Air: 300s, OnGround: 0b, Dimension: 0, Rotation: [-160.72876f, -20.094564f], UUIDMost: 570361438094378310L, inData: 0b, crit: 0b, Pos: [14.51067827428319d, 4.01790721023637d, -19.59053021206013d], Fire: -1s}Using /data remove doesn't seem to modify the CustomPotionEffects tag at all.
/data remove entity @e[limit=1,type=arrow] CustomPotionEffects[0]using this and then /data get gives the same results as listed
here.The bug
When using the /execute store command on a tipped arrow with custom potion effects, rather than replace the respective NBT, it will duplicate the field first, THEN replace the respective NBT in the new field.
How to reproduce
summon in Arrow entity with nbt data:
{ CustomPotionEffects: [ {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b} ] }Example command:
/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_eventsusing /data get on the entity results in:
Arrow has the following entity data: { CustomPotionEffects: [ {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b}, {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b} ] }Using /data remove doesn't seem to modify the CustomPotionEffects tag at all.
/data remove entity @e[limit=1,type=arrow] CustomPotionEffects[0]using this and then /data get gives the same results as listed above.
relates to
relates to
The bug
When using the /execute store command on a tipped arrow with custom potion effects, rather than replac
ethe respective NBT, it will duplicate the field first, THEN replace the respective NBT in the new field.How to reproduce
summon in Arrow entity with nbt data:
{ CustomPotionEffects: [ {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b} ] }Example command:
/execute store result entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run scoreboard players get null1 arrow_eventsusing /data get on the entity results in:
Arrow has the following entity data: { CustomPotionEffects: [ {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b}, {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b} ] }Using /data remove doesn't seem to modify the CustomPotionEffects tag at all.
/data remove entity @e[limit=1,type=arrow] CustomPotionEffects[0]using this and then /data get gives the same results as listed above.
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 CustomPotionEffects nbt data:
/summon arrow ~ ~ ~ {CustomPotionEffects:[{Ambient:0b,ShowParticles:1b,Duration:1200,Id:26b,Amplifier:1b}]}- Run an example execute store command:
/execute store success entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run say store- Using data get on the entity results in duplicate entries:
/data get entity @e[type=arrow,limit=1] CustomPotionEffectsResultArrow has the following entity data: { CustomPotionEffects: [ {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b}, {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b} ] }Using /data remove doesn't seem to modify the CustomPotionEffects tag at all.
/data remove entity @e[limit=1,type=arrow] CustomPotionEffects[0]using this and then /data get gives the same results as listed above.
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 CustomPotionEffects nbt data:
/summon arrow ~ ~ ~ {CustomPotionEffects:[{Ambient:0b,ShowParticles:1b,Duration:1200,Id:26b,Amplifier:1b}]}- Run an example execute store command:
/execute store success entity @e[limit=1,type=arrow] CustomPotionEffects[0].Id byte 1 run say store- Using data get on the entity results in duplicate entries:
/data get entity @e[type=arrow,limit=1] CustomPotionEffectsResultArrow has the following entity data: { CustomPotionEffects: [ {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b}, {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b} ] }Using /data remove doesn't seem to modify the CustomPotionEffects tag at all.
/data remove entity @e[limit=1,type=arrow] CustomPotionEffects[0]using this and then /data get gives the same results as listed above.
relates to
CustomPotionEffects in arrow entities duplicates with '/execute store' and isn't affected by '/data remove'custom_potion_effects in arrow entities duplicates with '/execute store' and isn't affected by '/data remove'
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
CustomPotionEffects nbt data:/summon arrow ~ ~ ~ {CustomPotionEffects:[{Ambient:0b,ShowParticles:1b,Duration:1200,Id:26b,Amplifier:1b}]}- Run an example execute store command:
/execute store success entity @e[limit=1,type=arrow]CustomPotionEffects[0].Idbyte1 run say store- Using data get
on the entity results in duplicate entries:/data get entity @e[type=arrow,limit=1]CustomPotionEffectsResultArrow has the following entity data: { CustomPotionEffects: [ {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 26b, Amplifier: 1b}, {Ambient: 0b, ShowParticles: 1b, Duration: 1200, Id: 1b, Amplifier: 1b} ] }Using /data remove doesn't seem to modify the
CustomPotionEffects tag at all./data remove entity @e[limit=1,type=arrow]CustomPotionEffects[0]using this and then /data get gives the same results as listed above.
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_effectsResultArrow 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.
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_effectsResultArrow 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.
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_effectsResultArrow 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 can be found in this comment.
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_effectsResultArrow 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
can be found inthis comment.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_effectsResultArrow 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 Dl can be found in this comment.
relates to
As far as I can tell, ``/data remove`` does not work.
There are a slew of bug reports about it not working for specific things, such as
In fact, I have yet to find anything on which the command actually does work, though I'm sure there are some somewhere – you must have unit tests that work at some level.
What I suspect is that the pattern of these bugs not been noticed as a general problem, just as a bunch of individual, low priority issues.
What I expect is that either remove works, or it is removed from the doc as not really part of the command if you're not going to fix it.


Can confirm for MC 17w46a.
In 18w31a the last command (/data remove entity @e[limit=1,type=arrow] CustomPotionEffects[0]) gives me an error: Can't access element 0, either doesn't exist or parent isn't a list.
Can confirm this is still a bug in 1.16.4 pre-release 2. It has the same behaviour with the /data modify command too
In 1.16.4, I can remove the tag. However, the data doesn't update until 600 ticks after I run the command!
If the life was 0 when I ran the command (i.e. the arrow just landed), it updates at life:600
If I set the life to 100 when I run the command, the arrow updates at life:700
Can confirm in 20w48a.
it's an obvious and easy-to-fix bug in the code:
When loading an arrow entity from NBT, it only adds new effects instead of rewriting them. That means we can't remove or modify the arrows' original effects.
To fix this bug, just add this.effects.clear(); before loading its effects from NBT ( addEffect(mobEffectInstance); )
So same cause and consequences as
MC-112826Wasn't this fixed in 22w42a?
MC-112826was.Not fixed in 22w42a, this is still present in 22w46a.
Relates to
MC-128225,MC-179815, MC-153392,MC-207605, MC-135044,MC-138100.This also appears to have the wrong category; the correct category is Commands, not Data Packs.
Can confirm for 1.19.4.
Seeing the recent effect NBT changes (snake_casing), does this still affect 1.20.2?
I am only partially able to reproduce this in 1.20.2, but I don't know if it's because of any error in my commands. The effect does not get duplicated, but I am not able to remove it using /data remove either. I am using the following commands:
/summon arrow ~ ~ ~ {custom_potion_effects:[{ambient:0b,show_particles:1b,duration:1200,id:"minecraft:luck",amplifier:1b}]} /execute store success entity @e[limit=1,type=arrow] custom_potion_effects[0].id byte 1 run say store /data remove entity @e[limit=1,type=arrow] custom_potion_effects[0]That could be an issue with the /execute store command because id is no longer a byte, but a string; however, I am not very familiar with these commands, so I am not sure what the correct alternative would be. Regardless, I still can't use /data remove, so I will add 1.20.2 as an affected version.
Update: the effect doesn't get duplicated when you use id, but it does when you use duration. So this hasn't been fixed. I will update the description accordingly.