mojira.dev
MC-112042

unable to detect arrows with custom effects

i am unable to give an arrow with custom potion effects a score dont know why tried using the exact data for the arrow and still didnt work
steps to reproduce
step 1
summon an arrow with a custom potion effect heres a command to do so:
/summon arrow ~ ~ ~ {pickup:2,CustomPotionEffects:[{Id:27,Amplifier:5,Duration:20,ShowParticles:0b}]}
step 2
give an arrow with the bad luck effect with an amplifier of 5 a tag
/scoreboard players tag @e[type=Arrow] add test {CustomPotionEffects:[{Id:27,Amplifier:5}]}
step 3
try to kill an arrow entity with the tag test with this command
/kill @e[type=Arrow,tag=test]

Comments 1

When testing for NBT data, you must specify it exactly as it's saved. The Id and Amplifier tags are saved as bytes, not integers:

/scoreboard players tag @e[type=Arrow] add test {CustomPotionEffects:[{Id:27b,Amplifier:5b}]}

tristan poole

(Unassigned)

Unconfirmed

Minecraft 1.11.2

Retrieved