Class WorldCopyClipboard

All Implemented Interfaces:
Clipboard, Extent, InputExtent, OutputExtent, Closeable, Flushable, AutoCloseable, Iterable<BlockVector3>

public class WorldCopyClipboard extends ReadOnlyClipboard
  • Constructor Details

    • WorldCopyClipboard

      public WorldCopyClipboard(Supplier<Extent> supplier, Region region)
    • WorldCopyClipboard

      public WorldCopyClipboard(Supplier<Extent> supplier, Region region, boolean hasEntities, boolean hasBiomes)
  • Method Details

    • getExtent

      public Extent getExtent()
    • getFullBlock

      public BaseBlock getFullBlock(int x, int y, int z)
    • getBlock

      public BlockState getBlock(int x, int y, int z)
    • getBiomeType

      public BiomeType getBiomeType(int x, int y, int z)
    • 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.

      Parameters:
      position - the (x, y, z) location to check the biome at
      Returns:
      the biome at the location
      See Also:
    • getEntities

      public List<? extends Entity> getEntities()
      Description copied from interface: Extent
      Get a list of all entities.

      If the extent is not wholly loaded (i.e. a world being simulated in the game will not have every chunk loaded), then this list may not be incomplete.

      Specified by:
      getEntities in interface Extent
      Specified by:
      getEntities in class ReadOnlyClipboard
      Returns:
      a list of entities
    • hasBiomes

      public boolean hasBiomes()
      Description copied from interface: Clipboard
      Returns true if the clipboard has biome data. This can be checked since InputExtent.getBiome(BlockVector2) strongly suggests returning BiomeTypes.OCEAN instead of null if biomes aren't present. However, it might not be desired to set areas to ocean if the clipboard is defaulting to ocean, instead of having biomes explicitly set.
      Returns:
      true if the clipboard has biome data set