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());
|
||||||
|
if (db != null) {
|
||||||
db.logEdit(this);
|
db.logEdit(this);
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
|
@ -256,6 +256,7 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
|
|||||||
getParent().getChangeTask().run(previous, this);
|
getParent().getChangeTask().run(previous, this);
|
||||||
}
|
}
|
||||||
// Trim tiles
|
// Trim tiles
|
||||||
|
if (!tiles.isEmpty()) {
|
||||||
Set<Map.Entry<BlockPos, TileEntity>> entryset = tiles.entrySet();
|
Set<Map.Entry<BlockPos, TileEntity>> entryset = tiles.entrySet();
|
||||||
Iterator<Map.Entry<BlockPos, TileEntity>> iterator = entryset.iterator();
|
Iterator<Map.Entry<BlockPos, TileEntity>> iterator = entryset.iterator();
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
@ -271,10 +272,13 @@ public class ForgeChunk_All extends CharFaweChunk<Chunk, ForgeQueue_All> {
|
|||||||
}
|
}
|
||||||
int k = FaweCache.CACHE_J[ly][lz][lx];
|
int k = FaweCache.CACHE_J[ly][lz][lx];
|
||||||
if (array[k] != 0) {
|
if (array[k] != 0) {
|
||||||
tile.getValue().invalidate();;
|
synchronized (ForgeChunk_All.class) {
|
||||||
|
tile.getValue().invalidate();
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
// Efficiently merge sections
|
// Efficiently merge sections
|
||||||
for (int j = 0; j < sections.length; j++) {
|
for (int j = 0; j < sections.length; j++) {
|
||||||
int count = this.getCount(j);
|
int count = this.getCount(j);
|
||||||
|
@ -256,6 +256,7 @@ 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
|
||||||
|
if (!tiles.isEmpty()) {
|
||||||
Set<Map.Entry<BlockPos, TileEntity>> entryset = tiles.entrySet();
|
Set<Map.Entry<BlockPos, TileEntity>> entryset = tiles.entrySet();
|
||||||
Iterator<Map.Entry<BlockPos, TileEntity>> iterator = entryset.iterator();
|
Iterator<Map.Entry<BlockPos, TileEntity>> iterator = entryset.iterator();
|
||||||
while (iterator.hasNext()) {
|
while (iterator.hasNext()) {
|
||||||
@ -271,10 +272,13 @@ public class SpongeChunk_1_11 extends CharFaweChunk<Chunk, SpongeQueue_1_11> {
|
|||||||
}
|
}
|
||||||
int k = FaweCache.CACHE_J[ly][lz][lx];
|
int k = FaweCache.CACHE_J[ly][lz][lx];
|
||||||
if (array[k] != 0) {
|
if (array[k] != 0) {
|
||||||
tile.getValue().invalidate();;
|
synchronized (SpongeChunk_1_11.class) {
|
||||||
|
tile.getValue().invalidate();
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
HashSet<UUID> entsToRemove = this.getEntityRemoves();
|
HashSet<UUID> entsToRemove = this.getEntityRemoves();
|
||||||
if (!entsToRemove.isEmpty()) {
|
if (!entsToRemove.isEmpty()) {
|
||||||
synchronized (SpongeChunk_1_11.class) {
|
synchronized (SpongeChunk_1_11.class) {
|
||||||
|
Loading…
Reference in New Issue
Block a user