Fix TE CME on sponge
This commit is contained in:
parent
eaedd5442a
commit
b8f37feef1
@ -259,6 +259,7 @@ public class SpongeChunk_1_11 extends CharFaweChunk<Chunk, SpongeQueue_1_11> {
|
|||||||
// Trim tiles
|
// Trim tiles
|
||||||
if (!tiles.isEmpty()) {
|
if (!tiles.isEmpty()) {
|
||||||
synchronized (SpongeChunk_1_11.class) {
|
synchronized (SpongeChunk_1_11.class) {
|
||||||
|
List<TileEntity> invalidate = null;
|
||||||
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()) {
|
||||||
@ -274,11 +275,15 @@ 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) {
|
||||||
synchronized (SpongeChunk_1_11.class) {
|
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
tile.getValue().invalidate();
|
if (invalidate == null) invalidate = new ArrayList<>();
|
||||||
|
invalidate.add(tile.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (invalidate != null) {
|
||||||
|
for (TileEntity tile : invalidate) {
|
||||||
|
tile.invalidate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -259,6 +259,7 @@ public class SpongeChunk_1_12 extends CharFaweChunk<Chunk, SpongeQueue_1_12> {
|
|||||||
// Trim tiles
|
// Trim tiles
|
||||||
if (!tiles.isEmpty()) {
|
if (!tiles.isEmpty()) {
|
||||||
synchronized (SpongeChunk_1_12.class) {
|
synchronized (SpongeChunk_1_12.class) {
|
||||||
|
List<TileEntity> invalidate = null;
|
||||||
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()) {
|
||||||
@ -274,11 +275,15 @@ public class SpongeChunk_1_12 extends CharFaweChunk<Chunk, SpongeQueue_1_12> {
|
|||||||
}
|
}
|
||||||
int k = FaweCache.CACHE_J[ly][lz][lx];
|
int k = FaweCache.CACHE_J[ly][lz][lx];
|
||||||
if (array[k] != 0) {
|
if (array[k] != 0) {
|
||||||
synchronized (SpongeChunk_1_12.class) {
|
|
||||||
iterator.remove();
|
iterator.remove();
|
||||||
tile.getValue().invalidate();
|
if (invalidate == null) invalidate = new ArrayList<>();
|
||||||
|
invalidate.add(tile.getValue());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (invalidate != null) {
|
||||||
|
for (TileEntity tile : invalidate) {
|
||||||
|
tile.invalidate();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user