protected boolean isSameKind(@Nonnull IBlockState state, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull BlockPos other) { IBlockState otherState = world.getBlockState(other).getActualState(world, other); if (isSameKind(state, otherState)) { return true; } if (FacadeUtil.instance.isFacaded(otherState)) { try { IBlockState facade = FacadeUtil.instance.getFacade(otherState, world, other, null); if (facade != null) { return isSameKind(state, facade); } } catch (Throwable t) { } } return false; }
@SuppressWarnings("null") private IBlockState getPaintSource(@Nonnull BlockPos pos) { IBlockState state = super.getBlockState(pos); if (state.getBlock() instanceof IPaintable.IBlockPaintableBlock) { return ((IPaintable.IBlockPaintableBlock) state.getBlock()).getPaintSource(state, wrapped, pos); } return FacadeUtil.instance.getFacade(state, wrapped, pos, null); }
@Override @SideOnly(Side.CLIENT) public boolean shouldSideBeRendered(@Nonnull IBlockState blockStateIn, @Nonnull IBlockAccess world, @Nonnull BlockPos pos, @Nonnull EnumFacing side) { IBlockState otherState = world.getBlockState(pos.offset(side)).getActualState(world, pos.offset(side)); if (FacadeUtil.instance.isFacaded(otherState)) { IBlockState facade = FacadeUtil.instance.getFacade(otherState, world, pos.offset(side), side); if (facade != null) { otherState = facade; } } if (otherState.getBlock() instanceof BlockFusedQuartz) { IBlockState ourState = blockStateIn.getActualState(world, pos); return !ourState.getValue(FusedQuartzType.KIND).connectTo(otherState.getValue(FusedQuartzType.KIND)) || (!BlockConfig.glassConnectToTheirColorVariants.get() && ourState.getValue(BlockColored.COLOR) != otherState.getValue(BlockColored.COLOR)); } return true; }