Major command changes that don't work yet.

This commit is contained in:
MattBDev
2019-07-05 20:46:48 -04:00
parent ffc2092d93
commit 8108d0a936
399 changed files with 13558 additions and 7985 deletions

View File

@ -69,11 +69,12 @@ public class ExtentBlockCopy implements RegionFunction {
@Override
public boolean apply(BlockVector3 position) throws WorldEditException {
BaseBlock block = source.getFullBlock(position);
BlockVector3 orig = position.subtract(from);
BlockVector3 transformed = transform.apply(orig.toVector3()).toBlockPoint();
// Apply transformations to NBT data if necessary
BaseBlock block = transformNbtData(source.getFullBlock(position));
block = transformNbtData(block);
return destination.setBlock(transformed.add(to), block);
}

View File

@ -20,6 +20,7 @@
package com.sk89q.worldedit.function.block;
import static com.google.common.base.Preconditions.checkNotNull;
import com.sk89q.worldedit.EditSession;
import com.sk89q.worldedit.WorldEditException;
import com.sk89q.worldedit.function.LayerFunction;
@ -79,8 +80,16 @@ public class Naturalizer implements LayerFunction {
}
private boolean naturalize(BlockVector3 position, int depth) throws WorldEditException {
return editSession.setBlock(position, getTargetBlock(depth));
BlockState block = editSession.getBlock(position);
BlockState targetBlock = getTargetBlock(depth);
if (block.equalsFuzzy(targetBlock)) {
return false;
}
return editSession.setBlock(position, targetBlock);
}
@Override
public boolean apply(BlockVector3 position, int depth) throws WorldEditException {
if (mask.test(position)) {