2015-02-26 23:41:06 +01:00
|
|
|
--- /home/matt/mc-dev-private//net/minecraft/server/BlockDiodeAbstract.java 2015-02-26 22:40:22.099608145 +0000
|
|
|
|
+++ src/main/java/net/minecraft/server/BlockDiodeAbstract.java 2015-02-26 22:40:22.103608145 +0000
|
2014-11-25 22:32:16 +01:00
|
|
|
@@ -2,6 +2,8 @@
|
|
|
|
|
|
|
|
import java.util.Random;
|
|
|
|
|
|
|
|
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
|
|
|
|
+
|
|
|
|
public abstract class BlockDiodeAbstract extends BlockDirectional {
|
|
|
|
|
2015-02-26 23:41:06 +01:00
|
|
|
protected final boolean N;
|
2014-11-25 22:32:16 +01:00
|
|
|
@@ -31,8 +33,18 @@
|
|
|
|
boolean flag = this.e(world, blockposition, iblockdata);
|
|
|
|
|
2015-02-26 23:41:06 +01:00
|
|
|
if (this.N && !flag) {
|
2014-11-25 22:32:16 +01:00
|
|
|
+ // CraftBukkit start
|
|
|
|
+ if (CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), 15, 0).getNewCurrent() != 0) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
world.setTypeAndData(blockposition, this.k(iblockdata), 2);
|
2015-02-26 23:41:06 +01:00
|
|
|
} else if (!this.N) {
|
2014-11-25 22:32:16 +01:00
|
|
|
+ // CraftBukkit start
|
|
|
|
+ if (CraftEventFactory.callRedstoneChange(world, blockposition.getX(), blockposition.getY(), blockposition.getZ(), 0, 15).getNewCurrent() != 15) {
|
|
|
|
+ return;
|
|
|
|
+ }
|
|
|
|
+ // CraftBukkit end
|
|
|
|
world.setTypeAndData(blockposition, this.e(iblockdata), 2);
|
|
|
|
if (!flag) {
|
|
|
|
world.a(blockposition, this.e(iblockdata).getBlock(), this.m(iblockdata), -1);
|