mirror of
https://github.com/SquidDev-CC/CC-Tweaked
synced 2025-05-30 13:14:11 +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
5eadf5533d
@ -631,6 +631,13 @@ public class BlockPeripheral extends BlockPeripheralBase
|
|||||||
return isOpaqueCube( state );
|
return isOpaqueCube( state );
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
@Deprecated
|
||||||
|
public boolean isFullBlock( IBlockState state )
|
||||||
|
{
|
||||||
|
return isOpaqueCube( state );
|
||||||
|
}
|
||||||
|
|
||||||
@Nonnull
|
@Nonnull
|
||||||
@Override
|
@Override
|
||||||
@Deprecated
|
@Deprecated
|
||||||
@ -638,4 +645,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