Class EditOperation

java.lang.Object
com.hypixel.hytale.builtin.buildertools.EditOperation

public class EditOperation extends Object
  • Constructor Details

    • EditOperation

      public EditOperation(@Nonnull World world, int x, int y, int z, int editRange, @Nullable org.joml.Vector3i min, @Nullable org.joml.Vector3i max, @Nullable org.joml.Vector3i selectionMin, @Nullable org.joml.Vector3i selectionMax, BlockMask blockMask)
      Parameters:
      min - lower corner of the area this edit covers, used to track which prefabs it dirties
      max - upper corner of the area this edit covers, used to track which prefabs it dirties
      selectionMin - lower corner of the player's selection, which the # mask filter matches against
      selectionMax - upper corner of the player's selection, which the # mask filter matches against
  • Method Details

    • getBlockMask

      public BlockMask getBlockMask()
    • getSelectionMin

      @Nullable public org.joml.Vector3i getSelectionMin()
    • getSelectionMax

      @Nullable public org.joml.Vector3i getSelectionMax()
    • getBefore

      @Nonnull public BlockSelection getBefore()
    • getAfter

      @Nonnull public BlockSelection getAfter()
    • getAccessor

      @Nonnull public SectionAccessor getAccessor()
    • getSkippedUnloaded

      public long getSkippedUnloaded()
    • getBlock

      public int getBlock(int x, int y, int z)
    • setBlock

      public boolean setBlock(int x, int y, int z, int blockId)
    • setBlock

      public boolean setBlock(int x, int y, int z, int blockId, int rotation)
      Sets a block at the given world coordinates with rotation.
      Parameters:
      x - the world X coordinate
      y - the world Y coordinate
      z - the world Z coordinate
      blockId - the block type ID
      rotation - the rotation tuple index
      Returns:
      true if the block was set, false otherwise
    • setMaterialWithFiller

      public boolean setMaterialWithFiller(int x, int y, int z, @Nonnull Material material)
      Places a material like setMaterial(int, int, int, Material), except blocks are stamped with full multi-cell filler and tiled against this edit's occupancy so multi-cell footprints never overlap or leave orphaned filler behind. Brushes that paint arbitrary block types use this; copy and transform operations keep setMaterial(int, int, int, Material) so they can write cells (including pre-resolved filler) verbatim.
    • clearFluid

      public boolean clearFluid(int x, int y, int z)
    • getFluid

      public int getFluid(int x, int y, int z)
      Gets the fluid ID at the given coordinates.
      Parameters:
      x - the world X coordinate
      y - the world Y coordinate
      z - the world Z coordinate
      Returns:
      the fluid ID
    • setMaterial

      public boolean setMaterial(int x, int y, int z, @Nonnull Material material)
      Sets a material (block or fluid) at the given world coordinates.

      If the material is a fluid, it sets the fluid layer. If the material is a block, it sets the block with rotation (and clears fluids if empty).

      Parameters:
      x - the world X coordinate
      y - the world Y coordinate
      z - the world Z coordinate
      material - the material to set
      Returns:
      true if the material was set, false otherwise
    • setTint

      public boolean setTint(int x, int z, int color, double opacity)
    • hasColumn

      public boolean hasColumn(int x, int z)
      Whether the column holding the position is in memory, so a tint has somewhere to go.
    • getTint

      public int getTint(int x, int z)
    • removeEntity

      public void removeEntity(Ref<EntityStore> entityRef, Holder<EntityStore> entityStoreHolder)
    • trackSpawnedEntity

      public void trackSpawnedEntity(Ref<EntityStore> ref)
    • getSpawnedEntityRefs

      public List<Ref<EntityStore>> getSpawnedEntityRefs()
    • trackMovedEntity

      public void trackMovedEntity(Ref<EntityStore> entityRef, ComponentAccessor<EntityStore> componentAccessor)
    • getMovedEntitySnapshots

      public List<EntityTransformSnapshot> getMovedEntitySnapshots()