diff options
author | Travis Watkins <amaranth@ubuntu.com> | 2013-12-20 16:40:28 -0600 |
---|---|---|
committer | EvilSeph <evilseph@gmail.com> | 2013-12-24 15:24:35 -0500 |
commit | c57e45dcdc6493e1f0b60ff53de280b3a5a118f3 (patch) | |
tree | 479da17c2713e7a9c696f3f81fe5ca5acacb93c5 /src/main/java/net/minecraft | |
parent | 4a5de4249c9270dc1ab0fbd6b88384d6bdb07eb7 (diff) | |
download | craftbukkit-c57e45dcdc6493e1f0b60ff53de280b3a5a118f3.tar craftbukkit-c57e45dcdc6493e1f0b60ff53de280b3a5a118f3.tar.gz craftbukkit-c57e45dcdc6493e1f0b60ff53de280b3a5a118f3.tar.lz craftbukkit-c57e45dcdc6493e1f0b60ff53de280b3a5a118f3.tar.xz craftbukkit-c57e45dcdc6493e1f0b60ff53de280b3a5a118f3.zip |
Process block cleanup first. Fixes BUKKIT-4103
When setting a block the server sets the new block ID, calls the cleanup
on the old block, then calls the placement logic for the new block. This
would normally work correctly but we have logic to prevent errors that is
causing one here. When trying to clean up the old block we notice the block
ID has changed and try to fix things, this causes the cleanup logic to
fail. To ensure cleanup happens correctly we now do all the cleanup before
changing the block which avoids triggering the fixup code.
Diffstat (limited to 'src/main/java/net/minecraft')
-rw-r--r-- | src/main/java/net/minecraft/server/Chunk.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java index 95b47049..014136c1 100644 --- a/src/main/java/net/minecraft/server/Chunk.java +++ b/src/main/java/net/minecraft/server/Chunk.java @@ -430,12 +430,13 @@ public class Chunk { block1.f(this.world, l1, j, i2, k1); } - chunksection.setTypeId(i, j & 15, k, block); + // chunksection.setTypeId(i, j & 15, k, block); // CraftBukkit - Moved down if (!this.world.isStatic) { block1.remove(this.world, l1, j, i2, block1, k1); } else if (block1 instanceof IContainer && block1 != block) { this.world.p(l1, j, i2); } + chunksection.setTypeId(i, j & 15, k, block); // CraftBukkit - Set new block after cleaning up old one if (chunksection.getTypeId(i, j & 15, k) != block) { return false; |