Class PasteBuilder

java.lang.Object
com.sk89q.worldedit.session.PasteBuilder

public class PasteBuilder extends Object
Builds an operation to paste the contents of a clipboard.
  • Method Details

    • to

      public PasteBuilder to(BlockVector3 to)
      Set the target location.
      Parameters:
      to - the target location
      Returns:
      this builder instance
    • maskSource

      public PasteBuilder maskSource(Mask sourceMask)
      Set a custom mask of blocks to ignore from the source. This provides a more flexible alternative to ignoreAirBlocks(boolean), for example one might want to ignore structure void if copying a Minecraft Structure, etc.
      Parameters:
      sourceMask - the mask for the source
      Returns:
      this builder instance
    • ignoreAirBlocks

      public PasteBuilder ignoreAirBlocks(boolean ignoreAirBlocks)
      Set whether air blocks in the source are skipped over when pasting.
      Returns:
      this builder instance
    • ignoreStructureVoidBlocks

      public PasteBuilder ignoreStructureVoidBlocks(boolean ignoreStructureVoidBlocks)
      Set whether structure void blocks in the source are skipped over when pasting.

      This currently defaults to false. In the next major version this will default to true, to better align to how Minecraft intends these blocks to function. It's recommended to set this if the value of this matters for you, even if it currently matches the default.

      Parameters:
      ignoreStructureVoidBlocks - value to set it to
      Returns:
      This builder instance
    • copyEntities

      public PasteBuilder copyEntities(boolean copyEntities)
      Set whether the copy should include source entities. Note that this is true by default for legacy reasons.
      Parameters:
      copyEntities - if entities should be copied
      Returns:
      this builder instance
    • copyBiomes

      public PasteBuilder copyBiomes(boolean copyBiomes)
      Set whether the copy should include source biomes (if available).
      Parameters:
      copyBiomes - if biomes should be copied
      Returns:
      this builder instance
    • build

      public Operation build()
      Build the operation.
      Returns:
      the operation