Class BrushConfigEditStore

java.lang.Object
com.hypixel.hytale.builtin.buildertools.scriptedbrushes.BrushConfigEditStore

public class BrushConfigEditStore extends Object
  • Constructor Details

    • BrushConfigEditStore

      public BrushConfigEditStore(Int3OpenHashSet placedBlockPositions, @Nonnull BrushConfig brushConfig, World world, @Nullable org.joml.Vector3i selectionMin, @Nullable org.joml.Vector3i selectionMax)
      Parameters:
      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

    • getAccessor

      @Nonnull public BrushConfigSectionAccessor getAccessor()
    • getColumns

      @Nonnull public ColumnAccessor getColumns()
    • getBrushConfig

      @Nonnull public BrushConfig getBrushConfig()
    • getSelectionMin

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

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

      public long getSkippedUnloaded()
    • getOriginalBlock

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

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

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

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

      public boolean setFullBlock(int x, int y, int z, int blockId, int rotation, int filler, int support, @Nullable Holder<ChunkStore> holder)
    • getFluid

      public int getFluid(int x, int y, int z)
      Gets the fluid ID at the given coordinates, considering previous edits.
      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. If the material is empty, it clears both block and fluid.

      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 if prevented by masks or density
    • 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 the current shape pass so multi-cell footprints never overlap or leave orphaned filler behind. Brush operations that place arbitrary block types (set, replace) use this; copy operations such as paste keep setMaterial(int, int, int, Material) so pre-resolved filler is written verbatim.
    • getBlockSampledataIncludingPreviousStages

      @Nonnull public BuilderToolsPlugin.BuilderState.BlocksSampleData getBlockSampledataIncludingPreviousStages(int x, int y, int z, int radius)
      Check within a square of a radius for the amount and type of the most-occurring block type
    • flushCurrentEditsToPrevious

      public void flushCurrentEditsToPrevious()
    • getAfter

      @Nonnull public BlockSelection getAfter()
    • getBefore

      @Nonnull public BlockSelection getBefore()