Paper/nms-patches/BlockRedstoneWire.patch
Thinkofdeath 90ac03522a Revert "Remove patch headers"
This reverts commit d6e3dff7d8.
2014-11-28 23:02:15 +00:00

28 lines
1.0 KiB
Diff

--- ../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
@@ -8,6 +8,8 @@
import java.util.Random;
import java.util.Set;
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
+
public class BlockRedstoneWire extends Block {
public static final BlockStateEnum NORTH = BlockStateEnum.of("north", EnumRedstoneWireConnection.class);
@@ -123,6 +125,15 @@
if (k > j - 1) {
j = k;
}
+
+ // CraftBukkit start
+ if (i != j) {
+ BlockRedstoneEvent event = new BlockRedstoneEvent(world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), i, j);
+ world.getServer().getPluginManager().callEvent(event);
+
+ j = event.getNewCurrent();
+ }
+ // CraftBukkit end
if (i != j) {
iblockdata = iblockdata.set(BlockRedstoneWire.POWER, Integer.valueOf(j));