Advertisement
Guest User

Code1

a guest
Oct 5th, 2022
429
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.59 KB | Source Code | 0 0
  1. public static void execute(LevelAccessor world, double x, double y, double z) {
  2. int Radius = 0;
  3. Radius = 20;
  4. int centre = 0;
  5. int x1,y1,z1;
  6.  
  7. for(x1 = centre - Radius;x1 < centre +Radius;x1++){
  8. for(y1 = centre-Radius;y1<centre+Radius;y1++) {
  9. for(z1 = centre-Radius;z1<centre+Radius;z1++){
  10. float squareDistance = ((x1 -centre) * (x1 -centre)) + ((y1-centre) * (y1-centre)) + ((z1-centre) * (z1-centre));
  11. if (squareDistance <= (Radius * Radius))
  12. world.setBlock(new BlockPos(x+x1, y+y1, z+z1), Blocks.AIR.defaultBlockState(), 3);
  13.  
  14.  
  15. }
  16. }
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement