mirror of
https://github.com/PaperMC/Paper.git
synced 2025-08-05 14:42:22 -07:00
Update to Minecraft 1.9
This commit is contained in:
@@ -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);
|
||||
|
Reference in New Issue
Block a user