Interface IChunkExtent<T extends IChunk>

All Superinterfaces:
Extent, InputExtent, OutputExtent
All Known Subinterfaces:
IQueueExtent<T>
All Known Implementing Classes:
SingleThreadQueueExtent

public interface IChunkExtent<T extends IChunk> extends Extent
  • Method Details

    • getOrCreateChunk

      T getOrCreateChunk(int chunkX, int chunkZ)
      Get the IChunk at a position (and cache it if it's not already)
      Returns:
      IChunk
    • setBlock

      default <B extends BlockStateHolder<B>> boolean setBlock(int x, int y, int z, B state)
      Specified by:
      setBlock in interface OutputExtent
    • setTile

      default boolean setTile(int x, int y, int z, CompoundTag tile) throws WorldEditException
      Specified by:
      setTile in interface OutputExtent
      Throws:
      WorldEditException
    • setBiome

      default 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)
    • getBlock

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

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

      default BiomeType getBiomeType(int x, int y, int z)
      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:
    • setSkyLight

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

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

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

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

      default int getBrightness(int x, int y, int z)
      Specified by:
      getBrightness in interface InputExtent
    • getOpacity

      default int getOpacity(int x, int y, int z)
      Specified by:
      getOpacity in interface InputExtent
    • createEntity

      default Entity createEntity(Location location, BaseEntity entity)
      Description copied from interface: Extent
      Create an entity at the given location.
      Specified by:
      createEntity in interface Extent
      Parameters:
      location - the location
      entity - the entity
      Returns:
      a reference to the created entity, or null if the entity could not be created
    • removeEntity

      default void removeEntity(int x, int y, int z, UUID uuid)
      Description copied from interface: Extent
      Create an entity at the given location.
      Specified by:
      removeEntity in interface Extent
      Parameters:
      x - the x coordinate
      y - the y coordinate
      z - the z coordinate
      uuid - the unique identifier of the entity