public static StructureBoundingBox findValidPlacement(List par0List, Random par1Random, int par2, int par3, int par4, int par5)
    {
        StructureBoundingBox var6 = new StructureBoundingBox(par2, par3, par4, par2, par3 + 2, par4);

        if (par1Random.nextInt(4) == 0)
        {
            var6.maxY += 4;
        }

        switch (par5)
        {
            case 0:
                var6.minX = par2 - 1;
                var6.maxX = par2 + 3;
                var6.maxZ = par4 + 4;
                break;

            case 1:
                var6.minX = par2 - 4;
                var6.minZ = par4 - 1;
                var6.maxZ = par4 + 3;
                break;

            case 2:
                var6.minX = par2 - 1;
                var6.maxX = par2 + 3;
                var6.minZ = par4 - 4;
                break;

            case 3:
                var6.maxX = par2 + 4;
                var6.minZ = par4 - 1;
                var6.maxZ = par4 + 3;
        }

        return StructureComponent.findIntersecting(par0List, var6) != null ? null : var6;
    }