2015-05-25 12:37:24 +02:00
|
|
|
--- a/net/minecraft/server/BlockDiodeAbstract.java
|
|
|
|
+++ b/net/minecraft/server/BlockDiodeAbstract.java
|
2014-11-25 22:32:16 +01:00
|
|
|
@@ -2,6 +2,8 @@
|
|
|
|
|
|
|
|
import java.util.Random;
|
|
|
|
|
|
|
|
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
|
|
|
|
+
|
2016-02-29 22:32:46 +01:00
|
|
|
public abstract class BlockDiodeAbstract extends BlockFacingHorizontal {
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2018-07-15 02:00:00 +02:00
|
|
|
protected static final VoxelShape b = Block.a(0.0D, 0.0D, 0.0D, 16.0D, 2.0D, 16.0D);
|
|
|
|
@@ -29,8 +31,18 @@
|
|
|
|
boolean flag1 = this.a(world, blockposition, iblockdata);
|
2014-11-25 22:32:16 +01:00
|
|
|
|
2018-07-15 02:00:00 +02:00
|
|
|
if (flag && !flag1) {
|
2014-11-25 22:32:16 +01:00
|
|
|
+ // CraftBukkit start
|
2018-07-15 02:00:00 +02:00
|
|
|
+ if (CraftEventFactory.callRedstoneChange(world, blockposition, 15, 0).getNewCurrent() != 0) {
|
2014-11-25 22:32:16 +01:00
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
2018-07-15 02:00:00 +02:00
|
|
|
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockDiodeAbstract.c, Boolean.valueOf(false)), 2);
|
|
|
|
} else if (!flag) {
|
2014-11-25 22:32:16 +01:00
|
|
|
+ // CraftBukkit start
|
2018-07-15 02:00:00 +02:00
|
|
|
+ if (CraftEventFactory.callRedstoneChange(world, blockposition, 0, 15).getNewCurrent() != 15) {
|
2014-11-25 22:32:16 +01:00
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
2018-07-15 02:00:00 +02:00
|
|
|
world.setTypeAndData(blockposition, (IBlockData) iblockdata.set(BlockDiodeAbstract.c, Boolean.valueOf(true)), 2);
|
|
|
|
if (!flag1) {
|
|
|
|
world.I().a(blockposition, this, this.j(iblockdata), TickListPriority.HIGH);
|