mirror of
				https://github.com/SquidDev-CC/CC-Tweaked
				synced 2025-10-31 13:42:59 +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:
		| @@ -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; | ||||||
|  |     } | ||||||
| } | } | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 SquidDev
					SquidDev