private boolean checkDoorIsSealed(World world, BlockPosition pos, int meta)
    {
        //TODO: door corners
        return ((meta & 8) == 8
                ||
                ((meta & 4) >> 2 == (meta & 1) && checkDoorSeal(world, pos.getPositionAtOffset(0, 0, 1), meta)
                        && checkDoorSeal(world, pos.getPositionAtOffset(0, 0, -1), meta))
                ||
                (meta & 4) >> 2 != (meta & 1) && checkDoorSeal(world, pos.getPositionAtOffset(1, 0, 0), meta)
                        && checkDoorSeal(world, pos.getPositionAtOffset(-1, 0, 0), meta));
    }
private boolean checkDoorIsSealed(World world, BlockPosition pos, int meta)
    {
       
        return ((meta & 8) == 8
                ||
                ((meta & 4) >> 2 == (meta & 1) && checkDoorSeal(world, pos.getPositionAtOffset(0, 0, 1), meta)
                        && checkDoorSeal(world, pos.getPositionAtOffset(0, 0, -1), meta))
                ||
                (meta & 4) >> 2 != (meta & 1) && checkDoorSeal(world, pos.getPositionAtOffset(1, 0, 0), meta)
                        && checkDoorSeal(world, pos.getPositionAtOffset(-1, 0, 0), meta));
    }
private boolean checkdoorissealed(world world, blockposition pos, int meta) { return ((meta & 8) == 8 || ((meta & 4) >> 2 == (meta & 1) && checkdoorseal(world, pos.getpositionatoffset(0, 0, 1), meta) && checkdoorseal(world, pos.getpositionatoffset(0, 0, -1), meta)) || (meta & 4) >> 2 != (meta & 1) && checkdoorseal(world, pos.getpositionatoffset(1, 0, 0), meta) && checkdoorseal(world, pos.getpositionatoffset(-1, 0, 0), meta)); }