Interface Clipboard

All Superinterfaces:
Extent, InputExtent, OutputExtent
All Known Implementing Classes:
BlockArrayClipboard

public interface Clipboard extends Extent
Specifies an object that implements something suitable as a "clipboard."
  • Method Details

    • getRegion

      Region getRegion()
      Get the bounding region of this extent.

      Implementations should return a copy of the region.

      Returns:
      the bounding region
    • getDimensions

      BlockVector3 getDimensions()
      Get the dimensions of the copy, which is at minimum (1, 1, 1).
      Returns:
      the dimensions
    • getOrigin

      BlockVector3 getOrigin()
      Get the origin point from which the copy was made from.
      Returns:
      the origin
    • setOrigin

      void setOrigin(BlockVector3 origin)
      Set the origin point from which the copy was made from.
      Parameters:
      origin - the origin
    • hasBiomes

      default boolean hasBiomes()
      Returns true if the clipboard has biome data. This can be checked since InputExtent.getBiome(BlockVector3) strongly suggests returning BiomeTypes.OCEAN instead of null if biomes aren't present.
      Returns:
      true if the clipboard has biome data set
    • transform

      default Clipboard transform(Transform transform) throws WorldEditException
      Returns a clipboard with a given transform baked in.

      Note: This method may return the same clipboard object, if a copy is needed then you should check the returned value for identity equality and copy if needed.

      Parameters:
      transform - The transform
      Returns:
      The new clipboard
      Throws:
      WorldEditException - if the copy encounters an error