1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2024-12-12 11:10:29 +00:00

Fix wireless modems suffocating entities

As of #458, BlockPeripheral will act as a full/opaque block for some
peripherals and a transparent one for others. However, some Block
methods use the default state rather than the current one. This means
modems report being a full block when they are not, leading to
suffocating entities and lighting glitches.
This commit is contained in:
SquidDev 2018-02-15 17:56:08 +00:00
parent 3b3dd8071b
commit 5208ad0b98

View File

@ -638,4 +638,20 @@ public class BlockPeripheral extends BlockPeripheralBase
{
return isOpaqueCube( state ) ? BlockFaceShape.SOLID : BlockFaceShape.UNDEFINED;
}
@Override
@Deprecated
public boolean causesSuffocation(IBlockState state)
{
// This normally uses the default state
return blockMaterial.blocksMovement() && state.isOpaqueCube();
}
@Override
@Deprecated
public int getLightOpacity( IBlockState state )
{
// This normally uses the default state
return isOpaqueCube( state ) ? 255 : 0;
}
}