how do I kill Entities with a custom nbt tag in minecraft 1.14.4?
A fireworks entity that was spawned with an item given with the command /give @a minecraft:firework_rocket{CustomModelData:12,Faulter:1b}
would have the Faulter
-tag stored like this: {FireworksItem:{tag:{Faulter:1b}}}
.
To kill all fireworks with that NBT-data you would use this command:
/kill @e[type=minecraft:firework_rocket,nbt={FireworksItem:{tag:{Faulter:1b}}}]
You can use this command to /kill
them if a mooshroom with the name "clearTest" is in loaded chunks in your world:
/execute if entity @e[type=minecraft:mooshroom,name=clearTest] run kill @e[type=minecraft:firework_rocket,nbt={FireworksItem:{tag:{Faulter:1b}}}]