@@ -0,0 +1,2248 @@
+package boq.utils.coord;%0A%0Aimport net.minecraftforge.common.ForgeDirection;%0Aimport boq.utils.misc.Rotation;%0A%0Apublic class BoundsRotator %7B%0A%0A    private BoundsRotator() %7B%7D%0A%0A    private static void rotX(Bounds bounds, double minY, double minZ, double maxY, double maxZ) %7B%0A        bounds.minY = minY;%0A        bounds.minZ = minZ;%0A%0A        bounds.maxY = maxY;%0A        bounds.maxZ = maxZ;%0A        bounds.correct();%0A    %7D%0A%0A    private static void rotY(Bounds bounds, double minX, double minZ, double maxX, double maxZ) %7B%0A        bounds.minX = minX;%0A        bounds.minZ = minZ;%0A%0A        bounds.maxX = maxX;%0A        bounds.maxZ = maxZ;%0A        bounds.correct();%0A    %7D%0A%0A    private static void rotZ(Bounds bounds, double minX, double minY, double maxX, double maxY) %7B%0A        bounds.minX = minX;%0A        bounds.minY = minY;%0A%0A        bounds.maxX = maxX;%0A        bounds.maxY = maxY;%0A        bounds.correct();%0A    %7D%0A%0A    // rotate clockwise around Z axis, R0 - +X, +Y%0A    public static void rotate(Bounds b, Rotation rotation) %7B%0A        switch (rotation) %7B%0A            case R0:%0A                break;%0A            case R90:%0A                rotZ(b, b.minY, 1 - b.minX, b.maxY, 1 - b.maxX);%0A                break;%0A            case R180:%0A                rotZ(b, 1 - b.minX, 1 - b.minY, 1 - b.maxX, 1 - b.maxY);%0A                break;%0A            case R270:%0A                rotZ(b, 1 - b.minY, b.minX, 1 - b.maxY, b.maxX);%0A                break;%0A        %7D%0A    %7D%0A%0A    public static void rotate(Bounds b, ForgeDirection direction) %7B%0A        switch (direction) %7B%0A            case SOUTH:%0A                break;%0A            case WEST:%0A                rotY(b, 1 - b.minZ, b.minX, 1 - b.maxZ, b.maxX);%0A                break;%0A            case NORTH:%0A                rotY(b, 1 - b.minX, 1 - b.minZ, 1 - b.maxX, 1 - b.maxZ);%0A                break;%0A            case EAST:%0A                rotY(b, b.minZ, 1 - b.minX, b.maxZ, 1 - b.maxX);%0A                break;%0A            case UP:%0A                rotX(b, b.minZ, 1 - b.minY, b.maxZ, 1 - b.maxY);%0A                break;%0A            case DOWN:%0A                rotX(b, 1 - b.minZ, b.minY, 1 - b.maxZ, b.maxY);%0A                break;%0A            case UNKNOWN:%0A                throw new IllegalArgumentException();%0A        %7D%0A    %7D%0A%0A%7D%0A

Move file from BRB