Minecraft plugin programming Radius on blocks to replace air?

Za
- in Plugins
2

I'm currently still programming my TNTRun plugin, and just want to do that e.g. Within a radius of one block the blocks in that radius can be replaced by air.

Ul

This is relatively eZ.

Either you use the distance method in location (inefficient)

or you can think about what the coordinate system looks like because it is a circle. You take sine and cosine and calculate the coordinates

(You must then continue to reduce the radius until you are in the center, otherwise only the outer ring will be removed)

On the unit circle shifts cosine in the X direction and sine in the Y direction.

Attention: I do not know how the coordinates are named in Minecraft!

The best thing to do is make a sketch if you know it and draw the on and off catheter from the positions, here you have to think three-dimensionally, because you probably want to cut out from the current point in all directions, I assume

Za

Thanks, was very helpful