}
private EnumSet<ForgeDirection> calculateFaceOpenFaces(IBlockAccess blockAccess, IFacadeContainer fc, int x, int y, int z, ForgeDirection side)
{
EnumSet<ForgeDirection> out = EnumSet.of( side, side.getOpposite() );
IFacadePart facade = fc.getFacade( side );
for (ForgeDirection it : ForgeDirection.VALID_DIRECTIONS)
{
if ( !out.contains( it ) && alphaDiff( blockAccess.getTileEntity( x + it.offsetX, y + it.offsetY, z + it.offsetZ ), side, facade ) )
{
out.add( it );
}
}
if ( out.contains( ForgeDirection.UP ) && (side.offsetX != 0 || side.offsetZ != 0) )
{
IFacadePart fp = fc.getFacade( ForgeDirection.UP );
if ( fp != null && (fp.isTransparent() == facade.isTransparent()) )
out.remove( ForgeDirection.UP );
}
if ( out.contains( ForgeDirection.DOWN ) && (side.offsetX != 0 || side.offsetZ != 0) )
{
IFacadePart fp = fc.getFacade( ForgeDirection.DOWN );
if ( fp != null && (fp.isTransparent() == facade.isTransparent()) )
out.remove( ForgeDirection.DOWN );
}
if ( out.contains( ForgeDirection.SOUTH ) && (side.offsetX != 0) )
{
IFacadePart fp = fc.getFacade( ForgeDirection.SOUTH );
if ( fp != null && (fp.isTransparent() == facade.isTransparent()) )
out.remove( ForgeDirection.SOUTH );
}
if ( out.contains( ForgeDirection.NORTH ) && (side.offsetX != 0) )
{
IFacadePart fp = fc.getFacade( ForgeDirection.NORTH );
if ( fp != null && (fp.isTransparent() == facade.isTransparent()) )
out.remove( ForgeDirection.NORTH );
}
/*
* if ( out.contains( ForgeDirection.EAST ) && (side.offsetZ != 0) ) { IFacadePart fp = fc.getFacade(