mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-10 06:48:34 +00:00
Major command changes that don't work yet.
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
@ -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)) {
|
||||
|
Reference in New Issue
Block a user