mirror of
https://github.com/PaperMC/Paper.git
synced 2024-12-30 12:57:41 +01:00
28 lines
983 B
Diff
28 lines
983 B
Diff
--- a/net/minecraft/server/BlockRedstoneWire.java
|
|
+++ b/net/minecraft/server/BlockRedstoneWire.java
|
|
@@ -11,6 +11,8 @@
|
|
import java.util.Set;
|
|
import javax.annotation.Nullable;
|
|
|
|
+import org.bukkit.event.block.BlockRedstoneEvent; // CraftBukkit
|
|
+
|
|
public class BlockRedstoneWire extends Block {
|
|
|
|
public static final BlockStateEnum<BlockPropertyRedstoneSide> NORTH = BlockProperties.R;
|
|
@@ -206,6 +208,15 @@
|
|
l = j;
|
|
}
|
|
|
|
+ // CraftBukkit start
|
|
+ if (i != l) {
|
|
+ BlockRedstoneEvent event = new BlockRedstoneEvent(world.getWorld().getBlockAt(blockposition.getX(), blockposition.getY(), blockposition.getZ()), i, l);
|
|
+ world.getServer().getPluginManager().callEvent(event);
|
|
+
|
|
+ l = event.getNewCurrent();
|
|
+ }
|
|
+ // CraftBukkit end
|
|
+
|
|
if (i != l) {
|
|
iblockdata = (IBlockData) iblockdata.set(BlockRedstoneWire.POWER, l);
|
|
if (world.getType(blockposition) == iblockdata1) {
|