@@ -9,11 +9,11 @@
|
||||
public class BlockDoor extends Block {
|
||||
|
||||
public static final BlockStateDirection FACING = BlockFacingHorizontal.FACING;
|
||||
@@ -163,9 +165,24 @@
|
||||
}
|
||||
@@ -171,9 +173,24 @@
|
||||
|
||||
public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1) {
|
||||
- boolean flag = world.isBlockIndirectlyPowered(blockposition) || world.isBlockIndirectlyPowered(blockposition.shift(iblockdata.get(BlockDoor.HALF) == BlockPropertyDoubleBlockHalf.LOWER ? EnumDirection.UP : EnumDirection.DOWN));
|
||||
@Override
|
||||
public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1, boolean flag) {
|
||||
- boolean flag1 = world.isBlockIndirectlyPowered(blockposition) || world.isBlockIndirectlyPowered(blockposition.shift(iblockdata.get(BlockDoor.HALF) == BlockPropertyDoubleBlockHalf.LOWER ? EnumDirection.UP : EnumDirection.DOWN));
|
||||
+ // CraftBukkit start
|
||||
+ BlockPosition otherHalf = blockposition.shift(iblockdata.get(BlockDoor.HALF) == BlockPropertyDoubleBlockHalf.LOWER ? EnumDirection.UP : EnumDirection.DOWN);
|
||||
+
|
||||
@@ -30,9 +30,9 @@
|
||||
+ BlockRedstoneEvent eventRedstone = new BlockRedstoneEvent(bukkitBlock, oldPower, power);
|
||||
+ world.getServer().getPluginManager().callEvent(eventRedstone);
|
||||
|
||||
- if (block != this && flag != (Boolean) iblockdata.get(BlockDoor.POWERED)) {
|
||||
+ boolean flag = eventRedstone.getNewCurrent() > 0;
|
||||
- if (block != this && flag1 != (Boolean) iblockdata.get(BlockDoor.POWERED)) {
|
||||
+ boolean flag1 = eventRedstone.getNewCurrent() > 0;
|
||||
+ // CraftBukkit end
|
||||
if (flag != (Boolean) iblockdata.get(BlockDoor.OPEN)) {
|
||||
this.b(world, blockposition, flag);
|
||||
if (flag1 != (Boolean) iblockdata.get(BlockDoor.OPEN)) {
|
||||
this.b(world, blockposition, flag1);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user