Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public static void execute(LevelAccessor world, double x, double y, double z) {
- int Radius = 0;
- Radius = 20;
- int centre = 0;
- int x1,y1,z1;
- for(x1 = centre - Radius;x1 < centre +Radius;x1++){
- for(y1 = centre-Radius;y1<centre+Radius;y1++) {
- for(z1 = centre-Radius;z1<centre+Radius;z1++){
- float squareDistance = ((x1 -centre) * (x1 -centre)) + ((y1-centre) * (y1-centre)) + ((z1-centre) * (z1-centre));
- if (squareDistance <= (Radius * Radius))
- world.setBlock(new BlockPos(x+x1, y+y1, z+z1), Blocks.AIR.defaultBlockState(), 3);
- }
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement