Interface IChunkGet

All Superinterfaces:
IBlocks, InputExtent, ITileInput, Trimable
All Known Subinterfaces:
IChunk, IQueueChunk<T>
All Known Implementing Classes:
CharGetBlocks, ChunkHolder, NullChunk, NullChunkGet

public interface IChunkGet extends IBlocks, Trimable, InputExtent, ITileInput
An interface for getting blocks.
  • Method Details

    • getFullBlock

      BaseBlock getFullBlock(int x, int y, int z)
      Specified by:
      getFullBlock in interface InputExtent
    • getBiomeType

      BiomeType getBiomeType(int x, int y, int z)
      Specified by:
      getBiomeType in interface IBlocks
      Specified by:
      getBiomeType in interface InputExtent
    • getBiome

      default BiomeType getBiome(BlockVector3 position)
      Description copied from interface: InputExtent
      Get the biome at the given location.

      If there is no biome available, then the ocean biome should be returned.

      As implementation varies per Minecraft version, this may not exactly get this positions biome. On versions prior to 1.15, this will get the entire column. On later versions it will get the 4x4x4 cube's biome.

      Specified by:
      getBiome in interface InputExtent
      Parameters:
      position - the (x, y, z) location to check the biome at
      Returns:
      the biome at the location
      See Also:
    • getBlock

      BlockState getBlock(int x, int y, int z)
      Specified by:
      getBlock in interface IBlocks
      Specified by:
      getBlock in interface InputExtent
    • getSkyLight

      int getSkyLight(int x, int y, int z)
      Specified by:
      getSkyLight in interface InputExtent
    • getEmittedLight

      int getEmittedLight(int x, int y, int z)
      Specified by:
      getEmittedLight in interface InputExtent
    • getHeightMap

      int[] getHeightMap(HeightMapType type)
      Specified by:
      getHeightMap in interface InputExtent
    • optimize

      default void optimize()
    • call

      <T extends Future<T>> T call(IChunkSet set, Runnable finalize)
    • getEntity

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

      @Nullable FaweCompoundTag entity(UUID uuid)
      Returns the compound tag describing the entity with the given UUID, if any.
      Parameters:
      uuid - the uuid of the entity
      Returns:
      the compound tag describing the entity with the given UUID, if any
    • getTile

      @Deprecated(forRemoval=true, since="2.11.2") default CompoundTag getTile(int x, int y, int z)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Specified by:
      getTile in interface IBlocks
      Specified by:
      getTile in interface ITileInput
    • isCreateCopy

      boolean isCreateCopy()
    • setCreateCopy

      int setCreateCopy(boolean createCopy)
      Not for external API use. Internal use only.
    • getCopy

      @Nullable default IChunkGet getCopy(int key)
    • lockCall

      default void lockCall()
      Lock the call(IChunkSet, Runnable) method to the current thread using a reentrant lock. Also locks related methods e.g. setCreateCopy(boolean)
      Since:
      2.8.2
    • unlockCall

      default void unlockCall()
      Unlock call(IChunkSet, Runnable) (and other related methods) to executions from other threads
      Since:
      2.8.2
    • setLightingToGet

      void setLightingToGet(char[][] lighting, int startSectionIndex, int endSectionIndex)
      Flush the block lighting array (section*blocks) to the chunk GET between the given section indices. Negative allowed.
      Parameters:
      lighting - lighting array
      startSectionIndex - lowest section index
      endSectionIndex - highest section index
    • setSkyLightingToGet

      void setSkyLightingToGet(char[][] lighting, int startSectionIndex, int endSectionIndex)
      Flush the sky lighting array (section*blocks) to the chunk GET between the given section indices. Negative allowed.
      Parameters:
      lighting - sky lighting array
      startSectionIndex - lowest section index
      endSectionIndex - highest section index
    • setHeightmapToGet

      void setHeightmapToGet(HeightMapType type, int[] data)
    • getMaxY

      int getMaxY()
      Max y value for the chunk's world (inclusive)
    • getMinY

      int getMinY()
      Min y value for the chunk's world (inclusive)