summaryrefslogtreecommitdiffstats
path: root/src/main/java
diff options
context:
space:
mode:
authorJohn Driscoll <johnoliverdriscoll@gmail.com>2012-08-08 00:42:18 -0700
committerWesley Wolfe <weswolf@aol.com>2012-08-17 17:06:46 -0500
commit0bde47a173dacd155da3f0715abfcba9455e0f17 (patch)
tree974d06efda9a489f8ba987ec3926ca86407d7524 /src/main/java
parent050a9276bc9348c354f2b73f2175b0aded2ea5d8 (diff)
downloadcraftbukkit-0bde47a173dacd155da3f0715abfcba9455e0f17.tar
craftbukkit-0bde47a173dacd155da3f0715abfcba9455e0f17.tar.gz
craftbukkit-0bde47a173dacd155da3f0715abfcba9455e0f17.tar.lz
craftbukkit-0bde47a173dacd155da3f0715abfcba9455e0f17.tar.xz
craftbukkit-0bde47a173dacd155da3f0715abfcba9455e0f17.zip
Don't extend pistons until data is set. Fixes BUKKIT-2153
Diffstat (limited to 'src/main/java')
-rw-r--r--src/main/java/net/minecraft/server/BlockPiston.java2
-rw-r--r--src/main/java/net/minecraft/server/Chunk.java6
2 files changed, 6 insertions, 2 deletions
diff --git a/src/main/java/net/minecraft/server/BlockPiston.java b/src/main/java/net/minecraft/server/BlockPiston.java
index 3bf3752a..2944eca7 100644
--- a/src/main/java/net/minecraft/server/BlockPiston.java
+++ b/src/main/java/net/minecraft/server/BlockPiston.java
@@ -55,7 +55,7 @@ public class BlockPiston extends Block {
public void onPlace(World world, int i, int j, int k) {
if (!world.isStatic && world.getTileEntity(i, j, k) == null) {
- // this.l(world, i, j, k); // CraftBukkit - don't extend arm of piston that doesn't exist
+ this.l(world, i, j, k);
}
}
diff --git a/src/main/java/net/minecraft/server/Chunk.java b/src/main/java/net/minecraft/server/Chunk.java
index 31cdcd55..192cd6f1 100644
--- a/src/main/java/net/minecraft/server/Chunk.java
+++ b/src/main/java/net/minecraft/server/Chunk.java
@@ -417,7 +417,11 @@ public class Chunk {
if (l != 0) {
if (!this.world.isStatic) {
- Block.byId[l].onPlace(this.world, j2, j, k2);
+ // CraftBukkit start - Don't extend piston until data is set
+ if (!(Block.byId[l] instanceof BlockPiston) || i2 != 0) {
+ Block.byId[l].onPlace(this.world, j2, j, k2);
+ }
+ // CraftBukkit end
}
if (Block.byId[l] instanceof BlockContainer) {