Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Don't extend pistons until data is set. Fixes BUKKIT-2153

  • Loading branch information...
commit 70314d9e1e0bfa8333a3eff075d43a77d20ed9d2 1 parent 625e704
John Driscoll authored August 08, 2012 Wolvereness committed August 17, 2012
2  src/main/java/net/minecraft/server/BlockPiston.java
@@ -55,7 +55,7 @@ public void doPhysics(World world, int i, int j, int k, int l) {
55 55
 
56 56
     public void onPlace(World world, int i, int j, int k) {
57 57
         if (!world.isStatic && world.getTileEntity(i, j, k) == null) {
58  
-            // this.l(world, i, j, k); // CraftBukkit - don't extend arm of piston that doesn't exist
  58
+            this.l(world, i, j, k);
59 59
         }
60 60
     }
61 61
 
6  src/main/java/net/minecraft/server/Chunk.java
@@ -417,7 +417,11 @@ public boolean a(int i, int j, int k, int l, int i1) {
417 417
 
418 418
                 if (l != 0) {
419 419
                     if (!this.world.isStatic) {
420  
-                        Block.byId[l].onPlace(this.world, j2, j, k2);
  420
+                        // CraftBukkit start - Don't extend piston until data is set
  421
+                        if (!(Block.byId[l] instanceof BlockPiston) || i2 != 0) {
  422
+                            Block.byId[l].onPlace(this.world, j2, j, k2);
  423
+                        }
  424
+                        // CraftBukkit end
421 425
                     }
422 426
 
423 427
                     if (Block.byId[l] instanceof BlockContainer) {

0 notes on commit 70314d9

Please sign in to comment.
Something went wrong with that request. Please try again.