mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-11 18:22:08 -07:00
Possibly fixed crashes caused by tile entities under certain circumstances again.
This commit is contained in:
@@ -1144,14 +1144,20 @@ public class World implements IBlockAccess {
|
||||
TileEntity tileentity1 = (TileEntity) iterator1.next();
|
||||
|
||||
if (!tileentity1.g()) {
|
||||
if (!this.c.contains(tileentity1)) {
|
||||
// CraftBukkit - order matters, moved down
|
||||
/* if (!this.c.contains(tileentity1)) {
|
||||
this.c.add(tileentity1);
|
||||
}
|
||||
} */
|
||||
|
||||
Chunk chunk1 = this.getChunkAt(tileentity1.x >> 4, tileentity1.z >> 4);
|
||||
|
||||
if (chunk1 != null) {
|
||||
chunk1.a(tileentity1.x & 15, tileentity1.y, tileentity1.z & 15, tileentity1);
|
||||
// CraftBukkit start - moved in from above
|
||||
if (!this.c.contains(tileentity1)) {
|
||||
this.c.add(tileentity1);
|
||||
}
|
||||
// CraftBukkit end
|
||||
}
|
||||
|
||||
this.notify(tileentity1.x, tileentity1.y, tileentity1.z);
|
||||
@@ -1539,8 +1545,8 @@ public class World implements IBlockAccess {
|
||||
|
||||
if (chunk != null) {
|
||||
chunk.a(i & 15, j, k & 15, tileentity);
|
||||
this.c.add(tileentity); // CraftBukkit - moved in from above
|
||||
}
|
||||
this.c.add(tileentity);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user