mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-15 07:05:53 +01:00
Should probably change this back
This commit is contained in:
parent
b0b2471b73
commit
ba15e28810
@ -6,6 +6,7 @@ import com.sk89q.worldedit.MaxChangedBlocksException;
|
||||
import com.sk89q.worldedit.Vector;
|
||||
import com.sk89q.worldedit.extent.clipboard.Clipboard;
|
||||
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.math.interpolation.Interpolation;
|
||||
import com.sk89q.worldedit.math.transform.AffineTransform;
|
||||
@ -98,7 +99,7 @@ public class ClipboardSpline extends Spline {
|
||||
final int offY = functionOffset.getBlockY();
|
||||
final int offZ = functionOffset.getBlockZ();
|
||||
|
||||
ForwardExtentCopy operation = clipboardHolder
|
||||
Operation operation = clipboardHolder
|
||||
.createPaste(editSession, editSession.getWorldData())
|
||||
.to(target)
|
||||
.ignoreAirBlocks(true)
|
||||
@ -110,6 +111,6 @@ public class ClipboardSpline extends Spline {
|
||||
clipboardHolder.setTransform(originalTransform);
|
||||
clipboard.setOrigin(originalOrigin);
|
||||
|
||||
return operation.getAffected();
|
||||
return operation instanceof ForwardExtentCopy ? ((ForwardExtentCopy) operation).getAffected() : 0;
|
||||
}
|
||||
}
|
@ -30,6 +30,7 @@ import com.sk89q.worldedit.function.RegionFunction;
|
||||
import com.sk89q.worldedit.function.mask.ExistingBlockMask;
|
||||
import com.sk89q.worldedit.function.mask.Mask;
|
||||
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.world.registry.WorldData;
|
||||
|
||||
@ -112,7 +113,7 @@ public class PasteBuilder {
|
||||
*
|
||||
* @return the operation
|
||||
*/
|
||||
public ForwardExtentCopy build() {
|
||||
public Operation build() {
|
||||
Extent extent = clipboard;
|
||||
if (!transform.isIdentity()) {
|
||||
extent = new BlockTransformExtent(extent, transform, targetWorldData.getBlockRegistry());
|
||||
|
Loading…
Reference in New Issue
Block a user