Class ReadOnlyClipboard

java.lang.Object
com.fastasyncworldedit.core.extent.clipboard.SimpleClipboard
com.fastasyncworldedit.core.extent.clipboard.ReadOnlyClipboard
All Implemented Interfaces:
Clipboard, Extent, InputExtent, OutputExtent, Closeable, Flushable, AutoCloseable, Iterable<BlockVector3>
Direct Known Subclasses:
WorldCopyClipboard

public abstract class ReadOnlyClipboard extends SimpleClipboard
  • Field Details

    • region

      public final Region region
  • Constructor Details

    • ReadOnlyClipboard

      public ReadOnlyClipboard(Region region)
  • Method Details

    • of

      public static ReadOnlyClipboard of(Region region)
    • of

      public static ReadOnlyClipboard of(Region region, boolean copyEntities, boolean copyBiomes)
    • of

      public static ReadOnlyClipboard of(Extent extent, Region region)
    • of

      public static ReadOnlyClipboard of(Extent extent, Region region, boolean copyEntities, boolean copyBiomes)
    • of

      public static ReadOnlyClipboard of(Supplier<Extent> supplier, Region region)
    • of

      public static ReadOnlyClipboard of(Supplier<Extent> supplier, Region region, boolean copyEntities, boolean copyBiomes)
    • getRegion

      public Region getRegion()
      Description copied from interface: Clipboard
      Get the bounding region of this extent.

      Implementations should return a copy of the region.

      Specified by:
      getRegion in interface Clipboard
      Overrides:
      getRegion in class SimpleClipboard
      Returns:
      the bounding region
    • setBiome

      public boolean setBiome(int x, int y, int z, BiomeType biome)
    • setBiome

      public 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.

      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)
    • getEntities

      public abstract 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.

      Returns:
      a list of entities
    • setBlock

      public <B extends BlockStateHolder<B>> boolean setBlock(int x, int y, int z, B block)
    • setTile

      public boolean setTile(int x, int y, int z, CompoundTag tag)
    • createEntity

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

      public void removeEntity(Entity entity)
      Description copied from interface: Clipboard
      Remove entity from clipboard.