I am making an arrow that explodes when it hits anything, but I need a way to testfor all blocks within a radius of 2 blocks to see if they're air or not. The only problem is, I dont know how.
Minecraft – Testing for a block in a certain radius
minecraft-commandsminecraft-java-edition
Related Topic
- Minecraft – How to /testfor a specific player in a certain radius of the command block
- Minecraft – Tp Players To a Certain Block When They First Spawn
- Minecraft – Setblock for conditional command block
- Minecraft – How to kill all mobs of a certain type in a radius and summon a new named mob
- Minecraft – How to teleport an arrow to another entitiy within a radius in Minecraft 1.13
Best Answer
Rather than testing for air blocks, why not use the inGround datatag for this:
First create a scoreboard:
Then, run these 2 commands on a fast clock:
Happy exploding :)