3
0
Mirror von https://github.com/PaperMC/Paper.git synchronisiert 2024-11-17 05:20:05 +01:00

Remove tile entities when a block is removed.

Dieser Commit ist enthalten in:
Tahg 2012-02-02 07:54:51 -05:00 committet von EvilSeph
Ursprung 8b5289d431
Commit 2dba592dc4

Datei anzeigen

@ -311,9 +311,12 @@ public class Chunk {
if (l1 != 0) { if (l1 != 0) {
if (!this.world.isStatic) { if (!this.world.isStatic) {
Block.byId[l1].remove(this.world, i2, j, j2); Block.byId[l1].remove(this.world, i2, j, j2);
} else if (Block.byId[l1] instanceof BlockContainer && l1 != l) { // CraftBukkit start - delete tile entities for removed blocks
if (Block.byId[l1] instanceof BlockContainer) {
this.world.n(i2, j, j2); this.world.n(i2, j, j2);
} }
// CraftBukkit end
}
} }
if ((this.b[i << this.world.heightBitsPlusFour | k << this.world.heightBits | j] & 255) != l) return false; // CraftBukkit if ((this.b[i << this.world.heightBitsPlusFour | k << this.world.heightBits | j] & 255) != l) return false; // CraftBukkit
@ -384,6 +387,11 @@ public class Chunk {
this.b[i << this.world.heightBitsPlusFour | k << this.world.heightBits | j] = (byte) (b0 & 255); this.b[i << this.world.heightBitsPlusFour | k << this.world.heightBits | j] = (byte) (b0 & 255);
if (k1 != 0) { if (k1 != 0) {
Block.byId[k1].remove(this.world, l1, j, i2); Block.byId[k1].remove(this.world, l1, j, i2);
// CraftBukkit start - delete tile entities for removed blocks
if (Block.byId[k1] instanceof BlockContainer) {
this.world.n(l1, j, i2);
}
// CraftBukkit end
} }
this.g.a(i, j, k, 0); this.g.a(i, j, k, 0);