Interface IChunkSet

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

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

      @Deprecated(forRemoval=true, since="2.11.2") default boolean setTile(int x, int y, int z, CompoundTag tile) throws WorldEditException
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      setTile in interface OutputExtent
      Throws:
      WorldEditException
    • tile

      boolean tile(int x, int y, int z, FaweCompoundTag tag)
      Description copied from interface: OutputExtent
      Sets a tile/block entity at the given location.
      Specified by:
      tile in interface OutputExtent
      Parameters:
      x - the x position
      y - the y position
      z - the z position
      tag - the tile/block entity to set
      Returns:
      true if the tile/block entity was placed
    • 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

      @Deprecated(forRemoval=true, since="2.11.2") default void setEntity(CompoundTag tag)
      Deprecated, for removal: This API element is subject to removal in a future version.
    • entity

      void entity(FaweCompoundTag 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
    • createCopy

      @Nonnull default IChunkSet createCopy()
      Create an entirely distinct copy of this SET instance. All mutable data must be copied to sufficiently prevent leakage between the copy and the original.
      Returns:
      distinct new instance