@@ -1,11 +1,11 @@
|
||||
--- a/net/minecraft/world/level/block/BlockFenceGate.java
|
||||
+++ b/net/minecraft/world/level/block/BlockFenceGate.java
|
||||
@@ -130,6 +130,17 @@
|
||||
public void doPhysics(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1, boolean flag) {
|
||||
@@ -129,6 +129,17 @@
|
||||
public void neighborChanged(IBlockData iblockdata, World world, BlockPosition blockposition, Block block, BlockPosition blockposition1, boolean flag) {
|
||||
if (!world.isClientSide) {
|
||||
boolean flag1 = world.isBlockIndirectlyPowered(blockposition);
|
||||
boolean flag1 = world.hasNeighborSignal(blockposition);
|
||||
+ // CraftBukkit start
|
||||
+ boolean oldPowered = iblockdata.get(BlockFenceGate.POWERED);
|
||||
+ boolean oldPowered = iblockdata.getValue(BlockFenceGate.POWERED);
|
||||
+ if (oldPowered != flag1) {
|
||||
+ int newPower = flag1 ? 15 : 0;
|
||||
+ int oldPower = oldPowered ? 15 : 0;
|
||||
@@ -16,5 +16,5 @@
|
||||
+ }
|
||||
+ // CraftBukkit end
|
||||
|
||||
if ((Boolean) iblockdata.get(BlockFenceGate.POWERED) != flag1) {
|
||||
world.setTypeAndData(blockposition, (IBlockData) ((IBlockData) iblockdata.set(BlockFenceGate.POWERED, flag1)).set(BlockFenceGate.OPEN, flag1), 2);
|
||||
if ((Boolean) iblockdata.getValue(BlockFenceGate.POWERED) != flag1) {
|
||||
world.setBlock(blockposition, (IBlockData) ((IBlockData) iblockdata.setValue(BlockFenceGate.POWERED, flag1)).setValue(BlockFenceGate.OPEN, flag1), 2);
|
||||
|
||||
Reference in New Issue
Block a user