Interface InputExtent

All Known Subinterfaces:
Clipboard, Extent, ReorderingExtent, World
All Known Implementing Classes:
AbstractBufferingExtent, AbstractDelegateExtent, AbstractWorld, BiomeQuirkExtent, BlockArrayClipboard, BlockBagExtent, BlockChangeLimiter, BlockQuirkExtent, BlockTransformExtent, ChangeSetExtent, ChunkBatchingExtent, ChunkLoadingExtent, DataValidatorExtent, EditSession, ExtentBuffer, ForgetfulExtentBuffer, LastAccessExtentCache, MaskingExtent, MultiStageReorder, NullExtent, NullWorld, RequestExtent, SideEffectExtent, SurvivalModeExtent, TracingExtent, WatchdogTickingExtent

public interface InputExtent
Provides the current state of blocks, entities, and so on.
  • Method Details

    • getBlock

      BlockState getBlock(BlockVector3 position)
      Get a snapshot of the block at the given location.

      If the given position is out of the bounds of the extent, then the behavior is undefined (an air block could be returned). However, null should not be returned.

      The returned block is immutable and is a snapshot of the block at the time of call. It has no position attached to it, so it could be reused in Patterns and so on.

      Parameters:
      position - position of the block
      Returns:
      the block
    • getFullBlock

      BaseBlock getFullBlock(BlockVector3 position)
      Get a immutable snapshot of the block at the given location.
      Parameters:
      position - position of the block
      Returns:
      the block
    • getBiome

      @Deprecated default BiomeType getBiome(BlockVector2 position)
      Deprecated.
      Biomes in Minecraft are 3D now, use getBiome(BlockVector3)
      Get the biome at the given location.

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

      Parameters:
      position - the (x, z) location to check the biome at
      Returns:
      the biome at the location
    • getBiome

      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.

      Parameters:
      position - the (x, y, z) location to check the biome at
      Returns:
      the biome at the location
      API Note:
      This must be overridden by new subclasses. See NonAbstractForCompatibility for details