mirror of
https://github.com/boy0001/FastAsyncWorldedit.git
synced 2024-11-25 03:55:35 +01:00
Fixes #487
This commit is contained in:
parent
f0e310da6d
commit
a08b68cac4
@ -85,7 +85,9 @@ public class RollbackOptimizedHistory extends DiskStorageHistory {
|
|||||||
if (super.close()) {
|
if (super.close()) {
|
||||||
// Save to DB
|
// Save to DB
|
||||||
RollbackDatabase db = DBHandler.IMP.getDatabase(getWorld());
|
RollbackDatabase db = DBHandler.IMP.getDatabase(getWorld());
|
||||||
db.logEdit(this);
|
if (db != null) {
|
||||||
|
db.logEdit(this);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -256,23 +256,27 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
|
|||||||
getParent().getChangeTask().run(previous, this);
|
getParent().getChangeTask().run(previous, this);
|
||||||
}
|
}
|
||||||
// Trim tiles
|
// Trim tiles
|
||||||
Set<Map.Entry<BlockPos, TileEntity>> entryset = tiles.entrySet();
|
if (!tiles.isEmpty()) {
|
||||||
Iterator<Map.Entry<BlockPos, TileEntity>> iterator = entryset.iterator();
|
Set<Map.Entry<BlockPos, TileEntity>> entryset = tiles.entrySet();
|
||||||
while (iterator.hasNext()) {
|
Iterator<Map.Entry<BlockPos, TileEntity>> iterator = entryset.iterator();
|
||||||
Map.Entry<BlockPos, TileEntity> tile = iterator.next();
|
while (iterator.hasNext()) {
|
||||||
BlockPos pos = tile.getKey();
|
Map.Entry<BlockPos, TileEntity> tile = iterator.next();
|
||||||
int lx = pos.getX() & 15;
|
BlockPos pos = tile.getKey();
|
||||||
int ly = pos.getY();
|
int lx = pos.getX() & 15;
|
||||||
int lz = pos.getZ() & 15;
|
int ly = pos.getY();
|
||||||
int j = FaweCache.CACHE_I[ly][lz][lx];
|
int lz = pos.getZ() & 15;
|
||||||
char[] array = this.getIdArray(j);
|
int j = FaweCache.CACHE_I[ly][lz][lx];
|
||||||
if (array == null) {
|
char[] array = this.getIdArray(j);
|
||||||
continue;
|
if (array == null) {
|
||||||
}
|
continue;
|
||||||
int k = FaweCache.CACHE_J[ly][lz][lx];
|
}
|
||||||
if (array[k] != 0) {
|
int k = FaweCache.CACHE_J[ly][lz][lx];
|
||||||
tile.getValue().invalidate();;
|
if (array[k] != 0) {
|
||||||
iterator.remove();
|
synchronized (ForgeChunk_All.class) {
|
||||||
|
tile.getValue().invalidate();
|
||||||
|
iterator.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
// Efficiently merge sections
|
// Efficiently merge sections
|
||||||
|
@ -256,23 +256,27 @@ public class SpongeChunk_1_11 extends CharFaweChunk<Chunk, SpongeQueue_1_11> {
|
|||||||
getParent().getChangeTask().run(previous, this);
|
getParent().getChangeTask().run(previous, this);
|
||||||
}
|
}
|
||||||
// Trim tiles
|
// Trim tiles
|
||||||
Set<Map.Entry<BlockPos, TileEntity>> entryset = tiles.entrySet();
|
if (!tiles.isEmpty()) {
|
||||||
Iterator<Map.Entry<BlockPos, TileEntity>> iterator = entryset.iterator();
|
Set<Map.Entry<BlockPos, TileEntity>> entryset = tiles.entrySet();
|
||||||
while (iterator.hasNext()) {
|
Iterator<Map.Entry<BlockPos, TileEntity>> iterator = entryset.iterator();
|
||||||
Map.Entry<BlockPos, TileEntity> tile = iterator.next();
|
while (iterator.hasNext()) {
|
||||||
BlockPos pos = tile.getKey();
|
Map.Entry<BlockPos, TileEntity> tile = iterator.next();
|
||||||
int lx = pos.getX() & 15;
|
BlockPos pos = tile.getKey();
|
||||||
int ly = pos.getY();
|
int lx = pos.getX() & 15;
|
||||||
int lz = pos.getZ() & 15;
|
int ly = pos.getY();
|
||||||
int j = FaweCache.CACHE_I[ly][lz][lx];
|
int lz = pos.getZ() & 15;
|
||||||
char[] array = this.getIdArray(j);
|
int j = FaweCache.CACHE_I[ly][lz][lx];
|
||||||
if (array == null) {
|
char[] array = this.getIdArray(j);
|
||||||
continue;
|
if (array == null) {
|
||||||
}
|
continue;
|
||||||
int k = FaweCache.CACHE_J[ly][lz][lx];
|
}
|
||||||
if (array[k] != 0) {
|
int k = FaweCache.CACHE_J[ly][lz][lx];
|
||||||
tile.getValue().invalidate();;
|
if (array[k] != 0) {
|
||||||
iterator.remove();
|
synchronized (SpongeChunk_1_11.class) {
|
||||||
|
tile.getValue().invalidate();
|
||||||
|
iterator.remove();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
HashSet<UUID> entsToRemove = this.getEntityRemoves();
|
HashSet<UUID> entsToRemove = this.getEntityRemoves();
|
||||||
|
Loading…
Reference in New Issue
Block a user