summaryrefslogtreecommitdiffstats
path: root/nms-patches/BlockDiodeAbstract.patch
diff options
context:
space:
mode:
Diffstat (limited to 'nms-patches/BlockDiodeAbstract.patch')
-rw-r--r--nms-patches/BlockDiodeAbstract.patch16
1 files changed, 8 insertions, 8 deletions
diff --git a/nms-patches/BlockDiodeAbstract.patch b/nms-patches/BlockDiodeAbstract.patch
index 8144ad41..36e5c204 100644
--- a/nms-patches/BlockDiodeAbstract.patch
+++ b/nms-patches/BlockDiodeAbstract.patch
@@ -6,25 +6,25 @@
+import org.bukkit.craftbukkit.event.CraftEventFactory; // CraftBukkit
+
- public abstract class BlockDiodeAbstract extends BlockDirectional {
+ public abstract class BlockDiodeAbstract extends BlockFacingHorizontal {
- protected final boolean N;
-@@ -31,8 +33,18 @@
+ protected static final AxisAlignedBB c = new AxisAlignedBB(0.0D, 0.0D, 0.0D, 1.0D, 0.125D, 1.0D);
+@@ -35,8 +37,18 @@
boolean flag = this.e(world, blockposition, iblockdata);
- if (this.N && !flag) {
+ if (this.d && !flag) {
+ // 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);
- } else if (!this.N) {
+ world.setTypeAndData(blockposition, this.y(iblockdata), 2);
+ } else if (!this.d) {
+ // 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);
+ world.setTypeAndData(blockposition, this.x(iblockdata), 2);
if (!flag) {
- world.a(blockposition, this.e(iblockdata).getBlock(), this.m(iblockdata), -1);
+ world.a(blockposition, this.x(iblockdata).getBlock(), this.D(iblockdata), -1);