mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-07-06 20:56:41 +00:00
This commit is contained in:
@ -50,7 +50,7 @@ public class BlockReplace implements RegionFunction {
|
||||
|
||||
@Override
|
||||
public boolean apply(BlockVector3 position) throws WorldEditException {
|
||||
return extent.setBlock(position, pattern.apply(position));
|
||||
return pattern.apply(extent, position, position);
|
||||
}
|
||||
|
||||
}
|
||||
|
@ -40,7 +40,7 @@ public class ExistingBlockMask extends AbstractExtentMask {
|
||||
|
||||
@Override
|
||||
public boolean test(BlockVector3 vector) {
|
||||
return !getExtent().getBlock(vector).getBlockType().getMaterial().isAir();
|
||||
return !vector.getBlock(getExtent()).getMaterial().isAir();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
|
@ -31,13 +31,6 @@ public class SolidBlockMask extends BlockMask {
|
||||
add(state -> state.getMaterial().isMovementBlocker());
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean test(BlockVector3 vector) {
|
||||
Extent extent = getExtent();
|
||||
BlockState block = extent.getBlock(vector);
|
||||
return block.getBlockType().getMaterial().isMovementBlocker();
|
||||
}
|
||||
|
||||
@Nullable
|
||||
@Override
|
||||
public Mask2D toMask2D() {
|
||||
|
@ -66,11 +66,13 @@ public class ChangeSetExecutor implements Operation {
|
||||
|
||||
@Override
|
||||
public Operation resume(RunContext run) throws WorldEditException {
|
||||
while (iterator.hasNext()) {
|
||||
Change change = iterator.next();
|
||||
Change change = iterator.next();
|
||||
if (type == Type.UNDO) {
|
||||
while (iterator.hasNext()) {
|
||||
change.undo(context);
|
||||
}
|
||||
} else {
|
||||
while (iterator.hasNext()) {
|
||||
change.redo(context);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user