Class BlockArrayCacheScopedQueueCoordinator


@ApiDescription(info="Internal use only. Subject to change at any time and created for specific use cases.") public class BlockArrayCacheScopedQueueCoordinator extends ScopedQueueCoordinator
QueueCoordinator that caches all blocks set to it in a given array of form BlockState[][][]. An offset can be applied to blocks set to it, and the scope limited. This should have blocks set to it one chunk at a time, based on the result of getMin() and getMax(). The min and max points of this queue are offset according to the minimum point given in the constructor, and the offsets set in setOffsetX(int) and setOffsetZ(int)
  • Constructor Details

    • BlockArrayCacheScopedQueueCoordinator

      public BlockArrayCacheScopedQueueCoordinator(Location min, Location max)
      Construct a new instance
      Parameters:
      min - Inclusive location of the minimum point to limit the scope to.
      max - Inclusive location of the maximum point to limit the scope to.
      Since:
      6.8.0
  • Method Details

    • getBlockStates

      public BlockState[][][] getBlockStates()
    • setBlock

      public boolean setBlock(int x, int y, int z, @NonNull BlockState id)
      Description copied from class: QueueCoordinator
      Sets the block at the coordinates provided to the given id.
      Overrides:
      setBlock in class ScopedQueueCoordinator
      Parameters:
      x - the x coordinate from from 0 to 15 inclusive
      y - the y coordinate from from 0 (inclusive) - maxHeight(exclusive)
      z - the z coordinate from 0 to 15 inclusive
      id - the BlockState to set the block to
      Returns:
      success or not
    • setBlock

      public boolean setBlock(int x, int y, int z, @NonNull Pattern pattern)
      Description copied from class: QueueCoordinator
      Sets the block at the coordinates provided to the given id.
      Overrides:
      setBlock in class ScopedQueueCoordinator
      Parameters:
      x - the x coordinate from from 0 to 15 inclusive
      y - the y coordinate from from 0 (inclusive) - maxHeight(exclusive)
      z - the z coordinate from 0 to 15 inclusive
      pattern - the pattern to set the block to
      Returns:
      success or not
    • getMin

      public @NonNull Location getMin()
      Overrides:
      getMin in class ScopedQueueCoordinator
    • getMax

      public @NonNull Location getMax()
      Overrides:
      getMax in class ScopedQueueCoordinator
    • setBlock

      public boolean setBlock(int x, int y, int z, @NonNull BaseBlock id)
      Description copied from class: QueueCoordinator
      Sets the block at the coordinates provided to the given id.
      Overrides:
      setBlock in class ScopedQueueCoordinator
      Parameters:
      x - the x coordinate from from 0 to 15 inclusive
      y - the y coordinate from from 0 (inclusive) - maxHeight(exclusive)
      z - the z coordinate from 0 to 15 inclusive
      id - the BaseBlock to set the block to
      Returns:
      success or not
    • getBlock

      public @Nullable BlockState getBlock(int x, int y, int z)
      Description copied from class: QueueCoordinator
      Get a block at the given coordinates.
      Overrides:
      getBlock in class DelegateQueueCoordinator
      Parameters:
      x - block x
      y - block y
      z - block z
      Returns:
      WorldEdit BlockState
    • setOffsetX

      public void setOffsetX(int offsetX)
    • setOffsetZ

      public void setOffsetZ(int offsetZ)
    • size

      public int size()
      Description copied from class: QueueCoordinator
      Get the size of the queue in chunks
      Overrides:
      size in class DelegateQueueCoordinator
      Returns:
      size
    • setBiome

      public boolean setBiome(int x, int z, @NonNull BiomeType biome)
      Description copied from class: QueueCoordinator
      Set a biome in XZ. This will likely set to the whole column
      Overrides:
      setBiome in class ScopedQueueCoordinator
      Parameters:
      x - x coordinate
      z - z coordinate
      biome - biome
      Returns:
      success or not
    • setBiome

      public boolean setBiome(int x, int y, int z, @NonNull BiomeType biome)
      Description copied from class: QueueCoordinator
      Set a biome in XYZ
      Overrides:
      setBiome in class ScopedQueueCoordinator
      Parameters:
      x - x coordinate
      y - y coordinate
      z - z coordinate
      biome - biome
      Returns:
      success or not
    • fillBiome

      public void fillBiome(BiomeType biome)
      Overrides:
      fillBiome in class ScopedQueueCoordinator
    • setTile

      public boolean setTile(int x, int y, int z, @NonNull CompoundTag tag)
      Description copied from class: QueueCoordinator
      Sets a tile entity at the coordinates provided to the given CompoundTag
      Overrides:
      setTile in class ScopedQueueCoordinator
      Parameters:
      x - the x coordinate from from 0 to 15 inclusive
      y - the y coordinate from from 0 (inclusive) - maxHeight(exclusive)
      z - the z coordinate from 0 to 15 inclusive
      tag - the CompoundTag to set the tile to
      Returns:
      success or not