summaryrefslogtreecommitdiffstats
path: root/nms-patches
diff options
context:
space:
mode:
authorThinkofdeath <thinkofdeath@spigotmc.org>2014-12-05 15:11:22 +0000
committerThinkofdeath <thinkofdeath@spigotmc.org>2014-12-05 15:11:22 +0000
commit0d4fba2c14b764452033cbf5f452a92a9a2c4d7c (patch)
tree1963c0ee03c1753032d7f8cd7446877b1e23fa0f /nms-patches
parent3f6a1db4f6290690dcbccad7a0d8c281361a228b (diff)
downloadcraftbukkit-0d4fba2c14b764452033cbf5f452a92a9a2c4d7c.tar
craftbukkit-0d4fba2c14b764452033cbf5f452a92a9a2c4d7c.tar.gz
craftbukkit-0d4fba2c14b764452033cbf5f452a92a9a2c4d7c.tar.lz
craftbukkit-0d4fba2c14b764452033cbf5f452a92a9a2c4d7c.tar.xz
craftbukkit-0d4fba2c14b764452033cbf5f452a92a9a2c4d7c.zip
SPIGOT-117: Fix sticky pistons firing for the wrong direction when pulling blocks backwards
Diffstat (limited to 'nms-patches')
-rw-r--r--nms-patches/BlockPiston.patch19
1 files changed, 12 insertions, 7 deletions
diff --git a/nms-patches/BlockPiston.patch b/nms-patches/BlockPiston.patch
index 70fac0b8..fb9b9e09 100644
--- a/nms-patches/BlockPiston.patch
+++ b/nms-patches/BlockPiston.patch
@@ -1,5 +1,5 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/BlockPiston.java 2014-11-28 17:43:42.933707439 +0000
-+++ src/main/java/net/minecraft/server/BlockPiston.java 2014-11-28 17:38:20.000000000 +0000
+--- ../work/decompile-8eb82bde//net/minecraft/server/BlockPiston.java 2014-12-05 15:10:57.106252715 +0000
++++ src/main/java/net/minecraft/server/BlockPiston.java 2014-12-05 15:10:54.834252765 +0000
@@ -1,6 +1,16 @@
package net.minecraft.server;
@@ -38,7 +38,7 @@
world.setTypeAndData(blockposition, iblockdata.set(BlockPiston.EXTENDED, Boolean.valueOf(false)), 2);
world.playBlockAction(blockposition, this, 1, enumdirection.a());
}
-@@ -286,6 +305,35 @@
+@@ -286,10 +305,40 @@
if (!pistonextendschecker.a()) {
return false;
} else {
@@ -64,13 +64,18 @@
+ }
+ };
+
-+ BlockPistonExtendEvent event = new BlockPistonExtendEvent(bblock, blocks, CraftBlock.notchToBlockFace(enumdirection));
+ int i = list.size() + list1.size();
+ Block[] ablock = new Block[i];
+ EnumDirection enumdirection1 = flag ? enumdirection : enumdirection.opposite();
+
++ BlockPistonExtendEvent event = new BlockPistonExtendEvent(bblock, blocks, CraftBlock.notchToBlockFace(enumdirection1));
+ world.getServer().getPluginManager().callEvent(event);
+
+ if (event.isCancelled()) {
+ return false;
+ }
+ // CraftBukkit end
- int i = list.size() + list1.size();
- Block[] ablock = new Block[i];
- EnumDirection enumdirection1 = flag ? enumdirection : enumdirection.opposite();
++
+ int j;
+ BlockPosition blockposition1;
+