summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockRedstoneWire.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/BlockRedstoneWire.patch')
-rw-r--r--nms-patches/BlockRedstoneWire.patch23
1 files changed, 16 insertions, 7 deletions
diff --git a/nms-patches/BlockRedstoneWire.patch b/nms-patches/BlockRedstoneWire.patch
index dc1362b7..e6ec4d36 100644
--- a/nms-patches/BlockRedstoneWire.patch
+++ b/nms-patches/BlockRedstoneWire.patch
@@ -1,5 +1,5 @@
---- ../work/decompile-8eb82bde//net/minecraft/server/BlockRedstoneWire.java 2014-11-28 17:43:42.953707438 +0000
-+++ src/main/java/net/minecraft/server/BlockRedstoneWire.java 2014-11-28 17:38:19.000000000 +0000
+--- /home/matt/mc-dev-private//net/minecraft/server/BlockRedstoneWire.java 2015-02-26 22:40:22.239608143 +0000
++++ src/main/java/net/minecraft/server/BlockRedstoneWire.java 2015-02-26 22:40:22.239608143 +0000
@@ -8,6 +8,8 @@
import java.util.Random;
import java.util.Set;
@@ -8,12 +8,11 @@
+
public class BlockRedstoneWire extends Block {
- public static final BlockStateEnum NORTH = BlockStateEnum.of("north", EnumRedstoneWireConnection.class);
-@@ -123,6 +125,15 @@
- if (k > j - 1) {
+ public static final BlockStateEnum<BlockRedstoneWire.EnumRedstoneWireConnection> NORTH = BlockStateEnum.of("north", BlockRedstoneWire.EnumRedstoneWireConnection.class);
+@@ -124,6 +126,15 @@
j = k;
}
-+
+
+ // CraftBukkit start
+ if (i != j) {
+ BlockRedstoneEvent event = new BlockRedstoneEvent(world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), i, j);
@@ -22,6 +21,16 @@
+ j = event.getNewCurrent();
+ }
+ // CraftBukkit end
-
++
if (i != j) {
iblockdata = iblockdata.set(BlockRedstoneWire.POWER, Integer.valueOf(j));
+ if (world.getType(blockposition) == iblockdata1) {
+@@ -232,7 +243,7 @@
+ }
+ }
+
+- private int getPower(World world, BlockPosition blockposition, int i) {
++ public int getPower(World world, BlockPosition blockposition, int i) { // CraftBukkit - public
+ if (world.getType(blockposition).getBlock() != this) {
+ return i;
+ } else {