RevolveOperation class

Пакет: com.hypixel.hytale.builtin.buildertools.tooloperations

Файл: com/hypixel/hytale/builtin/buildertools/tooloperations/RevolveOperation.java

extends: ToolOperation

Поля (113)

МодификаторыТипИмя
Neighbor, Reverse, Disabled
break
private Vector3f center
return
BlockSelection var1
int[][] var10
int var10
double var10
int var10
double var10
boolean var11
Vector3i var11
int var11
boolean var11
BlockSelection var12
int var12
double var12
double var12
double var12
BlockSelection var13
int var13
Vector3d var14
double var14
double var14
double var14
int var15
int var16
double var16
double var16
int var17
double var17
int var18
double var18
int var19
int var19
double var19
double var19
int var20
double var20
int var21
double var21
double var21
double var21
int var22
int var23
double var23
float var23
int var24
Holder var24
int var25
TransformComponent var25
Rotation3f var26
HeadRotation var27
WorldChunk var28
Ref var28
int var29
Rotation var3
int var30
int var31
int var32
int var36
int var37
int var38
int var39
RotationTuple var4
int var40
byte var41
Holder var42
TransformComponent var45
boolean var46
boolean var47
int var48
var48
Vector3i var49
double[] var5
World var5
RotationTuple var5
var5
double var5
var5
Vector3i var50
List var51
World var52
double var53
double var54
Store var55
List var56
double var57
int var58
int var59
BuilderToolsPlugin.BuilderState var6
double[] var6
Store var6
int var60
double var62
Holder var64
double var65
double var66
double var67
int var68
int var69
BlockSelection var7
double[] var7
TransformComponent var7
int var7
int[] var7
int var70
int var71
OverridableChunkAccessor var8
double var8
int[] var8
double var9
int var9

Методы (46)

МодификаторыВозвратСигнатура
Sampling Sampling()
private int checkNeighboursint checkNeighbours(int[][] var1, int var2, int var3, int var4, int var5, boolean var6)
static double computeRadiusXZdouble computeRadiusXZ(int var0, int var1, int var2, int var3, Vector3f var4)
for for(int var26 = var22; var26 <= var23; var26++)
for for(int var27 = var24; var27 <= var25; var27++)
for for(int var33 = var29; var33 <= var30; var33++)
for for(int var34 = var31; var34 <= var32; var34++)
for for(int var35 = var18; var35 >= var17; var35--)
for for(Ref var63 : var56)
for for(Ref var44 : var51)
for for(int var8 = 0; var8 <= this.copyCount; var8++)
for for(int var18 = 1; var18 <= this.copyCount; var18++)
for for(int var20 = 0; var20 < var10.length; var20++)
for for(int var16 = 1; var16 <= this.copyCount; var16++)
for for(int var17 = 0; var17 < var10.length; var17++)
for for(int var18 = 1; var18 < this.copyCount; var18++)
for for(int var8 = 0; var8 < var1.length; var8++)
for for(int var2 = 1; var2 <= this.copyCount; var2++)
for for(int var12 : var7)
for for(int var16 : var8)
if if(var7 == null)
if if(var47)
if if(var28 != null)
if if(this.samplingMode == RevolveOperation.Sampling.Neighbor)
if if(!var46 && var11)
if if(var59 <= 1000)
if if(var48 > 0)
if if(var66 > 0.0)
if if(var45 != null)
if if(var46)
if if(var58 == 0)
if if(this.currentSelection != null)
if if(this.samplingMode == RevolveOperation.Sampling.Neighbor && var13 > 0)
if if(var13 > 0)
if if(this.samplingMode == RevolveOperation.Sampling.Neighbor && var11 > 0)
if if(var27 != null)
if if(var5 == null)
if if(this.samplingMode == RevolveOperation.Sampling.Neighbor)
if if(var9 >= 0 && var9 < this.bufferX && var10 >= 0 && var10 < this.bufferZ)
if if(var11)
if if(var21 > var5)
private void reverseSamplevoid reverseSample()
private void rotatevoid rotate(Vector3i var1, int var2, double var3, int var5, double var6, double[] var8, double[] var9)
static int rotateBlockint rotateBlock(BlockSelection.BlockHolder var0, double var1)
private void rotateEntitiesvoid rotateEntities(ComponentAccessor<EntityStore> var1, double[] var2, double[] var3, double[] var4)
abstract super super(var1, var4, var5)

Исходный код

Показать/скрыть
class="kw">package com.hypixel.hytale.builtin.buildertools.tooloperations;

class="kw">import com.hypixel.hytale.builtin.buildertools.BuilderToolsPlugin;
class="kw">import com.hypixel.hytale.builtin.buildertools.utils.Material;
class="kw">import com.hypixel.hytale.component.AddReason;
class="kw">import com.hypixel.hytale.component.ComponentAccessor;
class="kw">import com.hypixel.hytale.component.Holder;
class="kw">import com.hypixel.hytale.component.Ref;
class="kw">import com.hypixel.hytale.component.Store;
class="kw">import com.hypixel.hytale.math.util.ChunkUtil;
class="kw">import com.hypixel.hytale.math.util.MathUtil;
class="kw">import com.hypixel.hytale.math.vector.Rotation3f;
class="kw">import com.hypixel.hytale.math.vector.Vector3iUtil;
class="kw">import com.hypixel.hytale.protocol.packets.buildertools.BuilderToolOnUseInteraction;
class="kw">import com.hypixel.hytale.protocol.packets.interface_.NotificationStyle;
class="kw">import com.hypixel.hytale.server.core.Message;
class="kw">import com.hypixel.hytale.server.core.asset.type.blocktype.config.Rotation;
class="kw">import com.hypixel.hytale.server.core.asset.type.blocktype.config.RotationTuple;
class="kw">import com.hypixel.hytale.server.core.entity.UUIDComponent;
class="kw">import com.hypixel.hytale.server.core.entity.entities.Player;
class="kw">import com.hypixel.hytale.server.core.modules.entity.component.HeadRotation;
class="kw">import com.hypixel.hytale.server.core.modules.entity.component.TransformComponent;
class="kw">import com.hypixel.hytale.server.core.modules.entity.tracker.EntityTrackerSystems;
class="kw">import com.hypixel.hytale.server.core.modules.entity.tracker.NetworkId;
class="kw">import com.hypixel.hytale.server.core.prefab.selection.standard.BlockSelection;
class="kw">import com.hypixel.hytale.server.core.universe.PlayerRef;
class="kw">import com.hypixel.hytale.server.core.universe.world.World;
class="kw">import com.hypixel.hytale.server.core.universe.world.accessor.OverridableChunkAccessor;
class="kw">import com.hypixel.hytale.server.core.universe.world.chunk.WorldChunk;
class="kw">import com.hypixel.hytale.server.core.universe.world.storage.ChunkStore;
class="kw">import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
class="kw">import it.unimi.dsi.fastutil.objects.ReferenceArrayList;
class="kw">import java.util.List;
class="kw">import java.util.UUID;
class="kw">import javax.annotation.Nonnull;
class="kw">import org.joml.Vector3d;
class="kw">import org.joml.Vector3f;
class="kw">import org.joml.Vector3i;

class="kw">public class RevolveOperation class="kw">extends ToolOperation {
   class="kw">private Vector3f center;
   class="kw">private BlockSelection currentSelection;
   class="kw">private RevolveOperation.Sampling samplingMode = RevolveOperation.Sampling.Neighbor;
   class="kw">private int copyCount = 6;
   class="kw">private double stepRadians;
   class="kw">private double stepDegrees;
   class="kw">private int bufferX;
   class="kw">private int bufferZ;
   class="kw">private Material[][][] materialBuffer;
   class="kw">private class="kw">static class="kw">final double DISTANCE_TO_NEXT_BLOCK = 0.33;
   class="kw">private class="kw">static class="kw">final int REVOLVE_COPY_LIMIT = 1000000;
   class="kw">private class="kw">static class="kw">final int MAX_ENTITIES = 1000;
   class="kw">private class="kw">static class="kw">final int MIN_COPY_FULL = 10;
   class="kw">private class="kw">static class="kw">final int MAX_COPY_FULL = 2000;
   class="kw">private class="kw">static class="kw">final int REVOLVE_DENSITY = 12;
   class="kw">private class="kw">static class="kw">final int[][] NEIGHBOR_OFFSETS_XZ = new int[][]{{1, 0}, {-1, 0}, {0, 1}, {0, -1}, {1, 1}, {-1, 1}, {1, -1}, {-1, -1}};

   class="kw">public RevolveOperation(
      @Nonnull Ref<EntityStore> var1,
      @Nonnull Player var2,
      @Nonnull PlayerRef var3,
      @Nonnull BuilderToolOnUseInteraction var4,
      @Nonnull ComponentAccessor<EntityStore> var5
   ) {
      super(var1, var4, var5);
      BuilderToolsPlugin.BuilderState var6 = BuilderToolsPlugin.getState(var2, var3);
      BlockSelection var7 = var6.getSelection();
      if (var7 == null) {
         BuilderToolsPlugin.sendFeedback(Message.translation("server.builderTools.noSelection"), var3, NotificationStyle.Warning, var5);
      } else if (!var7.hasSelectionBounds()) {
         BuilderToolsPlugin.sendFeedback(Message.translation("server.builderTools.noSelectionBounds"), var3, NotificationStyle.Warning, var5);
      } else {
         OverridableChunkAccessor var8 = this.edit.getAccessor();

         this.samplingMode = class="kw">switch ((String)this.args.tool().getOrDefault("aSampling", "structural")) {
            case "natural" -> RevolveOperation.Sampling.Reverse;
            case "none" -> RevolveOperation.Sampling.Disabled;
            class="kw">default -> RevolveOperation.Sampling.Neighbor;
         };
         this.copyCount = (Integer)this.args.tool().getOrDefault("bCount", 6);
         boolean var46 = (Boolean)this.args.tool().getOrDefault("cFullRevolve", false);
         boolean var47 = (Boolean)this.args.tool().getOrDefault("eUseDistance", false);
         boolean var11 = (Boolean)this.args.tool().getOrDefault("eCopyEntities", false);
         class="kw">switch ((String)this.args.tool().getOrDefault("dCenter", "target")) {
            case "player":
               Vector3d var14 = var3.getTransform().getPosition();
               this.center = new Vector3f((float)var14.x, (float)var14.y, (float)var14.z).floor().add(0.5F, 0.5F, 0.5F);
               break;
            class="kw">default:
               this.center = new Vector3f(this.x + 0.5F, this.y + this.originOffsetY, this.z + 0.5F);
         }

         int var48 = 0;
         if (var47) {
            var48 = (Integer)this.args.tool().getOrDefault("fDistance", 20);
         }

         Vector3i var49 = Vector3iUtil.min(var7.getSelectionMin(), var7.getSelectionMax());
         Vector3i var50 = Vector3iUtil.max(var7.getSelectionMin(), var7.getSelectionMax());
         int var15 = var49.x();
         int var16 = var50.x();
         int var17 = var49.y();
         int var18 = var50.y();
         int var19 = var49.z();
         int var20 = var50.z();
         this.currentSelection = new BlockSelection();
         this.bufferX = var16 - var15 + 1;
         int var21 = var18 - var17 + 1;
         this.bufferZ = var20 - var19 + 1;
         this.currentSelection.setPosition(var15, var17, var19);
         if (this.samplingMode.equals(RevolveOperation.Sampling.Neighbor)) {
            this.materialBuffer = new Material[this.bufferX][var21][this.bufferZ];
         }

         int var22 = var15 >> 5;
         int var23 = var16 >> 5;
         int var24 = var19 >> 5;
         int var25 = var20 >> 5;

         for (int var26 = var22; var26 <= var23; var26++) {
            for (int var27 = var24; var27 <= var25; var27++) {
               WorldChunk var28 = var8.getChunk(ChunkUtil.indexChunk(var26, var27));
               if (var28 != null) {
                  int var29 = Math.max(var15, var26 << 5);
                  int var30 = Math.min(var16, (var26 << 5) + 31);
                  int var31 = Math.max(var19, var27 << 5);
                  int var32 = Math.min(var20, (var27 << 5) + 31);

                  for (int var33 = var29; var33 <= var30; var33++) {
                     for (int var34 = var31; var34 <= var32; var34++) {
                        for (int var35 = var18; var35 >= var17; var35--) {
                           int var36 = var28.getBlock(var33, var35, var34);
                           int var37 = var28.getRotationIndex(var33, var35, var34);
                           int var38 = var28.getSupportValue(var33, var35, var34);
                           int var39 = var28.getFiller(var33, var35, var34);
                           int var40 = var28.getFluidId(var33, var35, var34);
                           byte var41 = var28.getFluidLevel(var33, var35, var34);
                           Holder var42 = var28.getBlockComponentHolder(var33, var35, var34);
                           if (var36 != 0
                              && var39 == 0
                              && (this.edit.getBlockMask() == null || !this.edit.getBlockMask().isExcluded(var8, var33, var35, var34, var49, var50, var36, 0))) {
                              this.currentSelection.addBlockAtWorldPos(var33, var35, var34, var36, var37, var39, var38, var42);
                           }

                           if (var40 != 0
                              && (this.edit.getBlockMask() == null || !this.edit.getBlockMask().isExcluded(var8, var33, var35, var34, var49, var50, 0, var40))) {
                              this.currentSelection.addFluidAtWorldPos(var33, var35, var34, var40, var41);
                           }

                           if (this.samplingMode == RevolveOperation.Sampling.Neighbor) {
                              this.materialBuffer[var33 - var15][var35 - var17][var34 - var19] = Material.full(var36, var37, var38, var39, var42, var40, var41);
                           }

                           this.edit.setMaterial(var33, var35, var34, Material.EMPTY);
                        }
                     }
                  }
               }
            }
         }

         List var51 = new ReferenceArrayList();
         if (!var46 && var11) {
            World var52 = var5.getExternalData().getWorld();
            Store var55 = var52.getEntityStore().getStore();
            List var56 = new ReferenceArrayList();
            BuilderToolsPlugin.forEachCopyableInSelection(var52, var15, var17, var19, var16 - var15, var18 - var17, var20 - var19, var56::add);
            int var59 = var56.size() * this.copyCount;
            if (var59 <= 1000) {
               for (Ref var63 : var56) {
                  Holder var64 = var55.copyEntity(var63);
                  this.currentSelection.addEntityFromWorld(var64);
                  var51.add(var63);
               }
            } else {
               BuilderToolsPlugin.sendFeedback(
                  Message.translation("server.builderTools.errorTooManyEntities").param("count", 1000), var3, NotificationStyle.Warning, var5
               );
            }
         }

         if (var48 > 0) {
            double var53 = (var15 + var16) / 2.0;
            double var57 = (var19 + var20) / 2.0;
            double var62 = var53 - this.center.x;
            double var65 = var57 - this.center.z;
            double var66 = Math.sqrt(var62 * var62 + var65 * var65);
            if (var66 > 0.0) {
               double var67 = var48 / var66;
               int var68 = (int)Math.floor(this.center.x + var62 * var67) - (var16 - var15) / 2;
               int var69 = (int)Math.floor(this.center.z + var65 * var67) - (var20 - var19) / 2;
               this.currentSelection.setPosition(var68, var17, var69);
               int var70 = var68 - var15;
               int var71 = var69 - var19;

               for (Ref var44 : var51) {
                  this.edit.trackMovedEntity(var44, var5);
                  TransformComponent var45 = var5.getComponent(var44, TransformComponent.getComponentType());
                  if (var45 != null) {
                     var45.getPosition().add(var70, 0.0, var71);
                  }
               }
            }
         }

         if (var46) {
            this.samplingMode = RevolveOperation.Sampling.Disabled;
            double var54 = computeRadiusXZ(var15, var16, var19, var20, this.center);
            this.copyCount = MathUtil.clamp((int)Math.round(var54 * 12.0), 10, 2000);
            int var58 = this.currentSelection.getBlockCount() + this.currentSelection.getFluidCount();
            if (var58 == 0) {
               class="kw">return;
            }

            int var60 = MathUtil.clamp(1000000 / var58, 10, 2000);
            this.copyCount = Math.min(this.copyCount, var60);
         }

         this.stepRadians = Math.toRadians(360.0 / this.copyCount);
         this.stepDegrees = 360.0 / this.copyCount;
      }
   }

   @Override
   class="kw">public void execute(ComponentAccessor<EntityStore> var1) {
   }

   @Override
   class="kw">public void executeAt(int var1, int var2, int var3, ComponentAccessor<EntityStore> var4) {
      if (this.currentSelection != null) {
         double[] var5 = new double[this.copyCount + 1];
         double[] var6 = new double[this.copyCount + 1];
         double[] var7 = new double[this.copyCount + 1];

         for (int var8 = 0; var8 <= this.copyCount; var8++) {
            double var9 = this.stepRadians * var8;
            var5[var8] = Math.cos(var9);
            var6[var8] = Math.sin(var9);
            var7[var8] = this.stepDegrees * var8;
         }

         if (this.samplingMode.equals(RevolveOperation.Sampling.Reverse)) {
            this.reverseSample();
            this.rotateEntities(var4, var6, var5, var7);
         } else {
            BlockSelection var12 = new BlockSelection();
            BlockSelection var13 = new BlockSelection();
            int[][] var10 = NEIGHBOR_OFFSETS_XZ;
            Vector3i var11 = new Vector3i();
            this.currentSelection
               .forEachBlock(
                  (var8x, var9x, var10x, var11x) -> {
                     int var12 = this.checkNeighbours(var10, var11x.blockId(), var8x, var9x, var10x, false);
                     int var13 = Integer.bitCount(var12);
                     double var14 = var8x + this.currentSelection.getX() + 0.5 - this.center.x;
                     double var16 = var10x + this.currentSelection.getZ() + 0.5 - this.center.z;

                     for (int var18 = 1; var18 <= this.copyCount; var18++) {
                        int var19 = rotateBlock(var11x, var7[var18]);
                        if (this.samplingMode == RevolveOperation.Sampling.Neighbor && var13 > 0) {
                           for (int var20 = 0; var20 < var10.length; var20++) {
                              if ((var12 & 1 << var20) != 0) {
                                 double var21 = var10[var20][0] * 0.33 + var14;
                                 double var23 = var10[var20][1] * 0.33 + var16;
                                 this.rotate(var11, var18, var21, var9x, var23, var6, var5);
                                 var12.addBlockAtWorldPos(var11.x, var11.y, var11.z, var11x.blockId(), var19, var11x.filler(), var11x.supportValue());
                              }
                           }
                        }

                        this.rotate(var11, var18, var14, var9x, var16, var6, var5);
                        if (var13 > 0) {
                           var12.addBlockAtWorldPos(var11.x, var11.y, var11.z, var11x.blockId(), var19, var11x.filler(), var11x.supportValue());
                        } else {
                           var13.addBlockAtWorldPos(var11.x, var11.y, var11.z, var11x.blockId(), var19, var11x.filler(), var11x.supportValue());
                           this.edit
                              .setMaterial(
                                 var11.x, var11.y, var11.z, Material.full(var11x.blockId(), var19, var11x.supportValue(), var11x.filler(), var11x.holder())
                              );
                        }
                     }
                  }
               );
            this.currentSelection.forEachFluid((var5x, var6x, var7x, var8x, var9x) -> {
               int var10 = this.checkNeighbours(var10, var8x, var5x, var6x, var7x, true);
               int var11 = Integer.bitCount(var10);
               double var12 = var5x + this.currentSelection.getX() + 0.5 - this.center.x;
               double var14 = var7x + this.currentSelection.getZ() + 0.5 - this.center.z;

               for (int var16 = 1; var16 <= this.copyCount; var16++) {
                  if (this.samplingMode == RevolveOperation.Sampling.Neighbor && var11 > 0) {
                     for (int var17 = 0; var17 < var10.length; var17++) {
                        if ((var10 & 1 << var17) != 0) {
                           double var18 = var10[var17][0] * 0.33 + var12;
                           double var20 = var10[var17][1] * 0.33 + var14;
                           this.rotate(var11, var16, var18, var6x, var20, var6, var5);
                           this.edit.setMaterial(var11.x, var11.y, var11.z, Material.fluid(var8x, var9x));
                        }
                     }
                  }

                  this.rotate(var11, var16, var12, var6x, var14, var6, var5);
                  this.edit.setMaterial(var11.x, var11.y, var11.z, Material.fluid(var8x, var9x));
               }
            });
            var12.forEachBlock(
               (var2x, var3x, var4x, var5x) -> {
                  if (!var13.hasBlockAtWorldPos(var2x, var3x, var4x)) {
                     this.edit
                        .setMaterial(
                           var2x, var3x, var4x, Material.full(var5x.blockId(), var5x.rotation(), var5x.supportValue(), var5x.filler(), var5x.holder())
                        );
                  }
               }
            );
            this.rotateEntities(var4, var6, var5, var7);
         }
      }
   }

   class="kw">private void rotateEntities(ComponentAccessor<EntityStore> var1, double[] var2, double[] var3, double[] var4) {
      World var5 = var1.getExternalData().getWorld();
      Store var6 = var5.getEntityStore().getStore();
      this.currentSelection.forEachEntity(var6x -> {
         TransformComponent var7 = var6x.getComponent(TransformComponent.getComponentType());
         double var8 = var7.getPosition().x();
         double var10 = var7.getPosition().y();
         double var12 = var7.getPosition().z();
         double var14 = var8 + this.currentSelection.getX() - this.center.x;
         double var16 = var12 + this.currentSelection.getZ() - this.center.z;

         for (int var18 = 1; var18 < this.copyCount; var18++) {
            double var19 = var14 * var3[var18] - var16 * var2[var18];
            double var21 = var14 * var2[var18] + var16 * var3[var18];
            float var23 = (float)Math.toRadians(-var4[var18]);
            Holder var24 = var6x.clone();
            TransformComponent var25 = var24.getComponent(TransformComponent.getComponentType());
            Rotation3f var26 = var25.getRotation();
            var26.addYaw(var23);
            HeadRotation var27 = var24.getComponent(HeadRotation.getComponentType());
            if (var27 != null) {
               var27.getRotation().addYaw(var23);
            }

            var25.getPosition().set(var19 + this.center.x, var10 + this.currentSelection.getY(), var21 + this.center.z);
            var24.putComponent(UUIDComponent.getComponentType(), new UUIDComponent(UUID.randomUUID()));
            var24.removeComponent(EntityTrackerSystems.Visible.getComponentType());
            var24.removeComponent(NetworkId.getComponentType());
            Ref var28 = new Ref<>(var6);
            var5.execute(() -> var6.addEntity(var24, var28, AddReason.LOAD));
            this.edit.trackSpawnedEntity(var28);
         }
      });
   }

   class="kw">private class="kw">static int rotateBlock(BlockSelection.BlockHolder var0, double var1) {
      Rotation var3 = Rotation.ofDegrees((int)(Math.round(-var1 / 90.0) * 90L));
      RotationTuple var4 = RotationTuple.get(var0.rotation());
      RotationTuple var5 = RotationTuple.of(var4.yaw().add(var3), var4.pitch(), var4.roll());
      if (var5 == null) {
         var5 = var4;
      }

      class="kw">return var5.index();
   }

   class="kw">private int checkNeighbours(int[][] var1, int var2, int var3, int var4, int var5, boolean var6) {
      int var7 = 0;
      if (this.samplingMode == RevolveOperation.Sampling.Neighbor) {
         for (int var8 = 0; var8 < var1.length; var8++) {
            int var9 = var3 + var1[var8][0];
            int var10 = var5 + var1[var8][1];
            if (var9 >= 0 && var9 < this.bufferX && var10 >= 0 && var10 < this.bufferZ) {
               boolean var11 = !var6
                  ? this.materialBuffer[var9][var4][var10].getBlockId() == var2
                  : this.materialBuffer[var9][var4][var10].getFluidId() == var2;
               if (var11) {
                  var7 |= 1 << var8;
               }
            }
         }
      }

      class="kw">return var7;
   }

   class="kw">private void rotate(Vector3i var1, int var2, double var3, int var5, double var6, double[] var8, double[] var9) {
      double var10 = var3 * var9[var2] - var6 * var8[var2];
      double var12 = var3 * var8[var2] + var6 * var9[var2];
      var1.set((int)Math.floor(var10 + this.center.x), var5 + this.currentSelection.getY(), (int)Math.floor(var12 + this.center.z));
   }

   class="kw">private void reverseSample() {
      this.currentSelection
         .setAnchor(
            (int)(this.center.x - this.currentSelection.getX()),
            (int)this.center.y - this.currentSelection.getY(),
            (int)(this.center.z - this.currentSelection.getZ())
         );

      for (int var2 = 1; var2 <= this.copyCount; var2++) {
         BlockSelection var1 = this.currentSelection.cloneSelection().rotateArbitrary((float)this.stepDegrees * var2, 0.0F, 0.0F);
         var1.forEachBlock(
            (var1x, var2x, var3, var4) -> this.edit
               .setMaterial(
                  var1x + this.currentSelection.getX(),
                  var2x + this.currentSelection.getY(),
                  var3 + this.currentSelection.getZ(),
                  Material.full(var4.blockId(), var4.rotation(), var4.supportValue(), var4.filler(), var4.holder())
               )
         );
         var1.forEachFluid(
            (var1x, var2x, var3, var4, var5) -> this.edit
               .setMaterial(
                  var1x + this.currentSelection.getX(), var2x + this.currentSelection.getY(), var3 + this.currentSelection.getZ(), Material.fluid(var4, var5)
               )
         );
      }
   }

   class="kw">private class="kw">static double computeRadiusXZ(int var0, int var1, int var2, int var3, Vector3f var4) {
      double var5 = 0.0;
      int[] var7 = new int[]{var0, var1};
      int[] var8 = new int[]{var2, var3};

      for (int var12 : var7) {
         for (int var16 : var8) {
            double var17 = var12 + 0.5 - var4.x;
            double var19 = var16 + 0.5 - var4.z;
            double var21 = var17 * var17 + var19 * var19;
            if (var21 > var5) {
               var5 = var21;
            }
         }
      }

      class="kw">return Math.sqrt(var5);
   }

   @Override
   class="kw">protected boolean executeBlock(int var1, int var2, int var3) {
      class="kw">return false;
   }

   class="kw">private enum Sampling {
      Neighbor,
      Reverse,
      Disabled;

      Sampling() {
      }
   }
}