mirror of
https://github.com/PaperMC/Paper.git
synced 2024-11-09 20:30:28 +01:00
28 lines
1.0 KiB
Diff
28 lines
1.0 KiB
Diff
--- a/net/minecraft/server/BlockRedstoneWire.java
|
|
+++ b/net/minecraft/server/BlockRedstoneWire.java
|
|
@@ -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<BlockRedstoneWire.EnumRedstoneWireConnection> NORTH = BlockStateEnum.of("north", BlockRedstoneWire.EnumRedstoneWireConnection.class);
|
|
@@ -166,6 +168,15 @@
|
|
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));
|
|
if (world.getType(blockposition) == iblockdata1) {
|