public class ForwardExtentCopy extends java.lang.Object implements Operation
This is a forward extent copy, meaning that it iterates over the blocks in the source extent, and will copy as many blocks as there are in the source. Therefore, interpolation will not occur to fill in the gaps.
warnedDeprecatedClasses
Constructor and Description |
---|
ForwardExtentCopy(Extent source,
Region region,
BlockVector3 from,
Extent destination,
BlockVector3 to)
Create a new copy.
|
ForwardExtentCopy(Extent source,
Region region,
Extent destination,
BlockVector3 to)
Create a new copy using the region's lowest minimum point as the
"from" position.
|
Modifier and Type | Method and Description |
---|---|
void |
cancel()
Abort the current task.
|
int |
getAffected()
Get the number of affected objects.
|
int |
getRepetitions()
Get the number of repetitions left.
|
RegionFunction |
getSourceFunction()
Get the function that gets applied to all source blocks after
the copy has been made.
|
Mask |
getSourceMask()
Get the mask that gets applied to the source extent.
|
java.lang.Iterable<com.sk89q.worldedit.util.formatting.text.Component> |
getStatusMessages()
Gets an iterable of messages that describe the current status of the
operation.
|
Transform |
getTransform()
Get the transformation that will occur on every point.
|
boolean |
isCopyingBiomes()
Return whether biomes should be copied along with blocks.
|
boolean |
isCopyingEntities()
Return whether entities should be copied along with blocks.
|
boolean |
isRemovingEntities()
Return whether entities that are copied should be removed.
|
Operation |
resume(RunContext run)
Complete the next step.
|
void |
setCopyingBiomes(boolean copyingBiomes)
Set whether biomes should be copies along with blocks.
|
void |
setCopyingEntities(boolean copyingEntities)
Set whether entities should be copied along with blocks.
|
void |
setRemovingEntities(boolean removingEntities)
Set whether entities that are copied should be removed.
|
void |
setRepetitions(int repetitions)
Set the number of repetitions left.
|
void |
setSourceFunction(RegionFunction function)
Set the function that gets applied to all source blocks after
the copy has been made.
|
void |
setSourceMask(Mask sourceMask)
Set a mask that gets applied to the source extent.
|
void |
setTransform(Transform transform)
Set the transformation that will occur on every point.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
addStatusMessages
public ForwardExtentCopy(Extent source, Region region, Extent destination, BlockVector3 to)
source
- the source extentregion
- the region to copydestination
- the destination extentto
- the destination positionthe main constructor
public ForwardExtentCopy(Extent source, Region region, BlockVector3 from, Extent destination, BlockVector3 to)
source
- the source extentregion
- the region to copyfrom
- the source positiondestination
- the destination extentto
- the destination positionpublic Transform getTransform()
The transformation will stack with each repetition.
public void setTransform(Transform transform)
transform
- a transformationgetTransform()
public Mask getSourceMask()
This mask can be used to filter what will be copied from the source.
public void setSourceMask(Mask sourceMask)
sourceMask
- a source maskgetSourceMask()
public RegionFunction getSourceFunction()
public void setSourceFunction(RegionFunction function)
function
- a source function, or null if none is to be appliedpublic int getRepetitions()
public void setRepetitions(int repetitions)
repetitions
- the number of repetitionspublic boolean isCopyingEntities()
public void setCopyingEntities(boolean copyingEntities)
copyingEntities
- true if copyingpublic boolean isRemovingEntities()
public void setRemovingEntities(boolean removingEntities)
removingEntities
- true if removingpublic boolean isCopyingBiomes()
public void setCopyingBiomes(boolean copyingBiomes)
copyingBiomes
- true if copyingpublic int getAffected()
public Operation resume(RunContext run) throws WorldEditException
Operation
resume
in interface Operation
run
- describes information about the current runWorldEditException
- an errorpublic void cancel()
Operation
Operation.resume(RunContext)
should not be called at any point in the
future. This method should not be called after successful completion of
the operation. This method must be called if the operation is
interrupted before completion.public java.lang.Iterable<com.sk89q.worldedit.util.formatting.text.Component> getStatusMessages()
Operation
getStatusMessages
in interface Operation