mirror of
https://github.com/plexusorg/Plex-FAWE.git
synced 2025-01-11 02:07:38 +00:00
Fixed FastModeExtent not properly handling dirty chunks.
This commit is contained in:
parent
f688b3daa5
commit
dcf35e5312
@ -82,17 +82,22 @@ public class FastModeExtent extends ExtentDelegate {
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public boolean setBlock(Vector location, BaseBlock block) throws WorldEditException {
|
public boolean setBlock(Vector location, BaseBlock block) throws WorldEditException {
|
||||||
|
if (enabled) {
|
||||||
dirtyChunks.add(new BlockVector2D(location.getBlockX() >> 4, location.getBlockZ() >> 4));
|
dirtyChunks.add(new BlockVector2D(location.getBlockX() >> 4, location.getBlockZ() >> 4));
|
||||||
return world.setBlock(location, block, !enabled);
|
return world.setBlock(location, block, false);
|
||||||
|
} else {
|
||||||
|
return world.setBlock(location, block, true);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
protected Operation commitBefore() {
|
protected Operation commitBefore() {
|
||||||
if (dirtyChunks.size() > 0) {
|
|
||||||
return new Operation() {
|
return new Operation() {
|
||||||
@Override
|
@Override
|
||||||
public Operation resume() throws WorldEditException {
|
public Operation resume() throws WorldEditException {
|
||||||
|
if (dirtyChunks.size() > 0) {
|
||||||
world.fixAfterFastMode(dirtyChunks);
|
world.fixAfterFastMode(dirtyChunks);
|
||||||
|
}
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -100,9 +105,6 @@ public class FastModeExtent extends ExtentDelegate {
|
|||||||
public void cancel() {
|
public void cancel() {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
} else {
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user