private int modelKey(double x, double z, int state) {
            if ((x / 0.5) % 1 != 0 || (z / 0.5) % 1 != 0) {
                throw new IllegalArgumentException("Position (" + x + ", " + z + ") must be on a 0.5 grid");
            }
            if (x < 0 || x > 16 || z < 0 || z > 16) {
                throw new IllegalArgumentException("Position (" + x + ", " + z + ") must be in range [0, 16]");
            }
            if (state >= numStates) {
                throw new IllegalArgumentException("State " + state + " is out of range [0, " + numStates + ")");
            }
            int xi = (int) (x / 0.5);
            int zi = (int) (z / 0.5);
            return (state << 10) | zi << 5 | xi;
        }
Fetches a component model baked at given position

@param x     X position, 0 to 16, on 0.5 grid
@param z     Z position, 0 to 16, on 0.5 grid
@param state Implementation specific state, 0 to numStates - 1
@return 48-element orient-baked CCModel array
integration/src/main/java/mrtjp/projectred/integration/client/GateComponentModels.java