minecraft-java-edition – How to Do Damage When Touching a Particle in Minecraft with Commands

minecraft-commandsminecraft-java-edition

Is it possible to do a particle effect that damages anyone who touches it? I saw this in a one command youtube video and it seems possible, but I'm not sure if it requires armor stands. Can anyone tell me please?

Best Answer

You cannot detect or target particles. You would use an armor stand to mark a location to run commands, targeting the armor stand itself and not the particles.

Example, where an armor stand inflicts the Instant Damage effect to nearby players:

/execute @e[type=ArmorStand] ~ ~ ~ /effect @a[r=3] minecraft:instant_damage

And a /particle command to create particles at the armor stand's location as an indicator:

/execute @e[type=ArmorStand] ~ ~ ~ /particle witchMagic ~ ~ ~ 0.5 0.5 0.5 0 10