mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-03-03 02:10:04 +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:
parent
3b3dd8071b
commit
5208ad0b98
@ -638,4 +638,20 @@ public class BlockPeripheral extends BlockPeripheralBase
|
|||||||
{
|
{
|
||||||
return isOpaqueCube( state ) ? BlockFaceShape.SOLID : BlockFaceShape.UNDEFINED;
|
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;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user