Should probably change this back

This commit is contained in:
Jesse Boyd 2017-09-05 01:57:41 +10:00
parent b0b2471b73
commit ba15e28810
No known key found for this signature in database
GPG Key ID: 59F1DE6293AF6E1F
2 changed files with 5 additions and 3 deletions

View File

@ -6,6 +6,7 @@ import com.sk89q.worldedit.MaxChangedBlocksException;
import com.sk89q.worldedit.Vector; import com.sk89q.worldedit.Vector;
import com.sk89q.worldedit.extent.clipboard.Clipboard; import com.sk89q.worldedit.extent.clipboard.Clipboard;
import com.sk89q.worldedit.function.operation.ForwardExtentCopy; import com.sk89q.worldedit.function.operation.ForwardExtentCopy;
import com.sk89q.worldedit.function.operation.Operation;
import com.sk89q.worldedit.function.operation.Operations; import com.sk89q.worldedit.function.operation.Operations;
import com.sk89q.worldedit.math.interpolation.Interpolation; import com.sk89q.worldedit.math.interpolation.Interpolation;
import com.sk89q.worldedit.math.transform.AffineTransform; import com.sk89q.worldedit.math.transform.AffineTransform;
@ -98,7 +99,7 @@ public class ClipboardSpline extends Spline {
final int offY = functionOffset.getBlockY(); final int offY = functionOffset.getBlockY();
final int offZ = functionOffset.getBlockZ(); final int offZ = functionOffset.getBlockZ();
ForwardExtentCopy operation = clipboardHolder Operation operation = clipboardHolder
.createPaste(editSession, editSession.getWorldData()) .createPaste(editSession, editSession.getWorldData())
.to(target) .to(target)
.ignoreAirBlocks(true) .ignoreAirBlocks(true)
@ -110,6 +111,6 @@ public class ClipboardSpline extends Spline {
clipboardHolder.setTransform(originalTransform); clipboardHolder.setTransform(originalTransform);
clipboard.setOrigin(originalOrigin); clipboard.setOrigin(originalOrigin);
return operation.getAffected(); return operation instanceof ForwardExtentCopy ? ((ForwardExtentCopy) operation).getAffected() : 0;
} }
} }

View File

@ -30,6 +30,7 @@ import com.sk89q.worldedit.function.RegionFunction;
import com.sk89q.worldedit.function.mask.ExistingBlockMask; import com.sk89q.worldedit.function.mask.ExistingBlockMask;
import com.sk89q.worldedit.function.mask.Mask; import com.sk89q.worldedit.function.mask.Mask;
import com.sk89q.worldedit.function.operation.ForwardExtentCopy; import com.sk89q.worldedit.function.operation.ForwardExtentCopy;
import com.sk89q.worldedit.function.operation.Operation;
import com.sk89q.worldedit.math.transform.Transform; import com.sk89q.worldedit.math.transform.Transform;
import com.sk89q.worldedit.world.registry.WorldData; import com.sk89q.worldedit.world.registry.WorldData;
@ -112,7 +113,7 @@ public class PasteBuilder {
* *
* @return the operation * @return the operation
*/ */
public ForwardExtentCopy build() { public Operation build() {
Extent extent = clipboard; Extent extent = clipboard;
if (!transform.isIdentity()) { if (!transform.isIdentity()) {
extent = new BlockTransformExtent(extent, transform, targetWorldData.getBlockRegistry()); extent = new BlockTransformExtent(extent, transform, targetWorldData.getBlockRegistry());