2015-05-25 12:37:24 +02:00
--- a/net/minecraft/server/BlockRedstoneWire.java
+++ b/net/minecraft/server/BlockRedstoneWire.java
2018-07-15 02:00:00 +02:00
@@ -11,6 +11,8 @@
2014-11-25 22:32:16 +01:00
import java.util.Set;
2016-05-10 13:47:39 +02:00
import javax.annotation.Nullable;
2014-11-25 22:32:16 +01:00
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
+
public class BlockRedstoneWire extends Block {
2018-08-26 04:00:00 +02:00
public static final BlockStateEnum<BlockPropertyRedstoneSide> NORTH = BlockProperties.M;
@@ -216,6 +218,15 @@
2014-11-25 22:32:16 +01:00
j = k;
}
2015-02-26 23:41:06 +01:00
2014-11-25 22:32:16 +01:00
+ // 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
2015-02-26 23:41:06 +01:00
+
2014-11-25 22:32:16 +01:00
if (i != j) {
2018-07-15 02:00:00 +02:00
iblockdata = (IBlockData) iblockdata.set(BlockRedstoneWire.POWER, Integer.valueOf(j));
2015-02-26 23:41:06 +01:00
if (world.getType(blockposition) == iblockdata1) {