Integrated omnipanels and air shields in ships

This commit is contained in:
Unknown 2019-04-19 02:14:44 +02:00
parent 6c6a59b4ba
commit ca4f2c98c9
3 changed files with 13 additions and 7 deletions

View file

@ -260,6 +260,12 @@ public abstract class BlockAbstractOmnipanel extends BlockAbstractBase {
return false;
}
@SuppressWarnings("deprecation")
@Override
public boolean isFullBlock(final IBlockState blockState) {
return false;
}
@Nonnull
@SideOnly(Side.CLIENT)
@Override
@ -450,7 +456,7 @@ public abstract class BlockAbstractOmnipanel extends BlockAbstractBase {
public int getConnectionMask(final IBlockAccess blockAccess, final BlockPos blockPos, final EnumFacing facing) {
final IBlockState blockState = blockAccess.getBlockState(blockPos);
return ( blockState.isFullCube()
|| blockState.getBlock() == this
|| blockState.getBlock() instanceof BlockAbstractOmnipanel
|| blockState.getMaterial() == Material.GLASS
|| blockState.getBlock() instanceof BlockPane ? 1 : 0 )
+ (blockState.isSideSolid(blockAccess, blockPos, facing.getOpposite()) ? 2 : 0);

View file

@ -58,6 +58,12 @@ public abstract class BlockAbstractAir extends BlockAbstractBase {
return true;
}
@SuppressWarnings("deprecation")
@Override
public boolean isFullCube(final IBlockState state) {
return false;
}
@Override
public boolean isAir(final IBlockState blockState, final IBlockAccess blockAccess, final BlockPos pos) {
return true;

View file

@ -30,12 +30,6 @@ public class BlockAirShield extends BlockAbstractOmnipanel {
return false;
}
@SuppressWarnings("deprecation")
@Override
public boolean isFullBlock(final IBlockState blockState) {
return false;
}
@Override
public void addCollisionBoxToList(final IBlockState blockState, final @Nonnull World world, final @Nonnull BlockPos blockPos,
final @Nonnull AxisAlignedBB entityBox, final @Nonnull List<AxisAlignedBB> collidingBoxes,