protected void toggleDeadSide(int r) {
        if (getDeadSides() == 0) return;

        int oldShape = getShape();
        int shape = oldShape ^ rotationToDeadSideBit(r);
        if (Integer.bitCount(shape) > getMaxDeadSides()) return;

        configureShapeAndSend(shape);
    }
Combination of {@link TimedStateGateTile} and {@link SimpleGateTile}.
TODO: Find a cleaner way to do this
fabrication/src/main/java/mrtjp/projectred/fabrication/engine/gates/SimpleTimedStateGateTile.java