Permalink
Browse files

Merge pull request #521 from SquidDev-CC/hotfix/modem-full-block

Fix wireless modems suffocating entities
  • Loading branch information...
dan200 committed Mar 5, 2018
2 parents 3b3dd80 + 5eadf55 commit 914df8b0c7cc28451ea56a53808024511ff52642
Showing with 23 additions and 0 deletions.
  1. +23 −0 src/main/java/dan200/computercraft/shared/peripheral/common/BlockPeripheral.java
@@ -631,11 +631,34 @@ public final boolean isFullCube( IBlockState state )
return isOpaqueCube( state );
}
+ @Override
+ @Deprecated
+ public boolean isFullBlock( IBlockState state )
+ {
+ return isOpaqueCube( state );
+ }
+
@Nonnull
@Override
@Deprecated
public BlockFaceShape getBlockFaceShape( IBlockAccess world, IBlockState state, BlockPos pos, EnumFacing side )
{
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;
+ }
}

0 comments on commit 914df8b

Please sign in to comment.