ShapeOperation class

Пакет: com.hypixel.hytale.builtin.buildertools.scriptedbrushes.operations.sequential

Файл: com/hypixel/hytale/builtin/buildertools/scriptedbrushes/operations/sequential/ShapeOperation.java

extends: SequenceBrushOperation

Поля (1)

МодификаторыТипИмя
final BuilderCodec<ShapeOperation> CODEC

Методы (1)

МодификаторыВозвратСигнатура
abstract super super("Shape", "Changes the shape of the brush editing area", false)

Исходный код

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

class="kw">import com.hypixel.hytale.builtin.buildertools.scriptedbrushes.BrushConfig;
class="kw">import com.hypixel.hytale.builtin.buildertools.scriptedbrushes.BrushConfigCommandExecutor;
class="kw">import com.hypixel.hytale.builtin.buildertools.scriptedbrushes.operations.system.SequenceBrushOperation;
class="kw">import com.hypixel.hytale.codec.KeyedCodec;
class="kw">import com.hypixel.hytale.codec.builder.BuilderCodec;
class="kw">import com.hypixel.hytale.codec.codecs.EnumCodec;
class="kw">import com.hypixel.hytale.component.ComponentAccessor;
class="kw">import com.hypixel.hytale.component.Ref;
class="kw">import com.hypixel.hytale.protocol.packets.buildertools.BrushShape;
class="kw">import com.hypixel.hytale.server.core.universe.world.storage.EntityStore;
class="kw">import javax.annotation.Nonnull;

class="kw">public class ShapeOperation class="kw">extends SequenceBrushOperation {
   class="kw">public class="kw">static class="kw">final BuilderCodec<ShapeOperation> CODEC = BuilderCodec.builder(ShapeOperation.class, ShapeOperation::new)
      .append(new KeyedCodec<>("Shape", new EnumCodec<>(BrushShape.class)), (var0, var1) -> var0.brushShapeArg = var1, var0 -> var0.brushShapeArg)
      .documentation("Changes the brush shape")
      .add()
      .documentation("Changes the shape of the brush editing area")
      .build();
   @Nonnull
   class="kw">public BrushShape brushShapeArg = BrushShape.Sphere;

   class="kw">public ShapeOperation() {
      super("Shape", "Changes the shape of the brush editing area", false);
   }

   @Override
   class="kw">public void modifyBrushConfig(
      @Nonnull Ref<EntityStore> var1, @Nonnull BrushConfig var2, @Nonnull BrushConfigCommandExecutor var3, @Nonnull ComponentAccessor<EntityStore> var4
   ) {
      var2.setShape(this.brushShapeArg);
   }
}