Interface IChunkSet

All Superinterfaces:
IBlocks, OutputExtent, Trimable
All Known Subinterfaces:
IChunk, IQueueChunk<T>
All Known Implementing Classes:
BitSetBlocks, CharSetBlocks, ChunkHolder, NullChunk

public interface IChunkSet extends IBlocks, OutputExtent
Interface for setting blocks
  • Method Details

    • setBiome

      boolean setBiome(int x, int y, int z, BiomeType biome)
      Specified by:
      setBiome in interface OutputExtent
    • setBiome

      default boolean setBiome(BlockVector3 position, BiomeType biome)
      Description copied from interface: OutputExtent
      Set the biome.

      As implementation varies per Minecraft version, this may set more than this position's biome. On versions prior to 1.15, this will set the entire column. On later versions it will set the 4x4x4 cube.

      Specified by:
      setBiome in interface OutputExtent
      Parameters:
      position - the (x, y, z) location to set the biome at
      biome - the biome to set to
      Returns:
      true if the biome was successfully set (return value may not be accurate)
    • setBlock

      <T extends BlockStateHolder<T>> boolean setBlock(int x, int y, int z, T holder)
      Specified by:
      setBlock in interface OutputExtent
    • setBlocks

      void setBlocks(int layer, char[] data)
    • isEmpty

      boolean isEmpty()
    • setTile

      boolean setTile(int x, int y, int z, CompoundTag tile)
      Specified by:
      setTile in interface OutputExtent
    • setBlockLight

      void setBlockLight(int x, int y, int z, int value)
      Specified by:
      setBlockLight in interface OutputExtent
    • setSkyLight

      void setSkyLight(int x, int y, int z, int value)
      Specified by:
      setSkyLight in interface OutputExtent
    • setHeightMap

      void setHeightMap(HeightMapType type, int[] heightMap)
      Specified by:
      setHeightMap in interface OutputExtent
    • setLightLayer

      void setLightLayer(int layer, char[] toSet)
    • setSkyLightLayer

      void setSkyLightLayer(int layer, char[] toSet)
    • setFullBright

      void setFullBright(int layer)
    • setEntity

      void setEntity(CompoundTag tag)
    • removeEntity

      void removeEntity(UUID uuid)
    • getEntityRemoves

      Set<UUID> getEntityRemoves()
    • getBiomes

      BiomeType[][] getBiomes()
      This will return only biomes SET to the EXTENT or QUEUE. This will NOT return the current biomes in the world. This is used for history purposes.
      Returns:
      Array of biomes set
    • hasBiomes

      default boolean hasBiomes()
    • getLight

      char[][] getLight()
    • getSkyLight

      char[][] getSkyLight()
    • hasLight

      default boolean hasLight()
    • setFastMode

      default void setFastMode(boolean fastMode)
    • isFastMode

      default boolean isFastMode()
    • setBitMask

      default void setBitMask(int bitMask)
    • getBitMask

      default int getBitMask()
      Specified by:
      getBitMask in interface IBlocks
    • getHeightMaps

      default Map<HeightMapType,int[]> getHeightMaps()
    • reset

      IChunkSet reset()
      Specified by:
      reset in interface IBlocks
    • commit

      @Nullable default Operation commit()
      Description copied from interface: OutputExtent
      Return an Operation that should be called to tie up loose ends (such as to commit changes in a buffer).
      Specified by:
      commit in interface OutputExtent
      Returns:
      an operation or null if there is none to execute
    • hasBiomes

      boolean hasBiomes(int layer)
      If the given layer has biomes stored to be set to the world. Can be negative
      Parameters:
      layer - layer to check
      Returns:
      if the layer has biomes stored to be set to the world