Class TemporalExtent

All Implemented Interfaces:
Extent, InputExtent, OutputExtent
Direct Known Subclasses:
SourceMaskExtent

public class TemporalExtent extends PassthroughExtent
  • Constructor Details

    • TemporalExtent

      public TemporalExtent(Extent extent)
      Create a new instance.
      Parameters:
      extent - the extent
  • Method Details

    • set

      public <B extends BlockStateHolder<B>> void set(int x, int y, int z, B block)
    • set

      public void set(int x, int z, BiomeType biome)
    • getBlock

      public BlockState getBlock(BlockVector3 position)
      Description copied from interface: InputExtent
      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.

      Specified by:
      getBlock in interface InputExtent
      Overrides:
      getBlock in class PassthroughExtent
      Parameters:
      position - position of the block
      Returns:
      the block
    • getBlock

      public BlockState getBlock(int x, int y, int z)
      Specified by:
      getBlock in interface InputExtent
      Overrides:
      getBlock in class AbstractDelegateExtent
    • getFullBlock

      public BaseBlock getFullBlock(BlockVector3 position)
      Description copied from interface: InputExtent
      Get an immutable snapshot of the block at the given location.
      Specified by:
      getFullBlock in interface InputExtent
      Overrides:
      getFullBlock in class PassthroughExtent
      Parameters:
      position - position of the block
      Returns:
      the block
    • getBiome

      public 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
      Overrides:
      getBiome in class AbstractDelegateExtent
      Parameters:
      position - the (x, y, z) location to check the biome at
      Returns:
      the biome at the location
      See Also: