// Path: src/main/java/de/johni0702/minecraft/gui/versions/MCVer.java
// public static void popScissorState() {
//     setScissorBounds(scissorStateStack.pop());
// }
// 
// Path: src/main/java/de/johni0702/minecraft/gui/versions/MCVer.java
// public static void pushScissorState() {
//     scissorStateStack.push(scissorState);
// }


import net.minecraft.util.Identifier;
import static de.johni0702.minecraft.gui.versions.MCVer.popScissorState;
import static de.johni0702.minecraft.gui.versions.MCVer.pushScissorState;
import de.johni0702.minecraft.gui.utils.NonNull;
import de.johni0702.minecraft.gui.utils.lwjgl.Point;
import de.johni0702.minecraft.gui.utils.lwjgl.ReadableColor;
import de.johni0702.minecraft.gui.utils.lwjgl.ReadableDimension;
import de.johni0702.minecraft.gui.utils.lwjgl.ReadablePoint;
import net.minecraft.client.util.math.MatrixStack;
        return size;
    }

    @Override
    public void setDrawingArea(int x, int y, int width, int height) {
        if (!strict) {
            renderer.setDrawingArea(x + position.getX(), y + position.getY(), width, height);
            return;
        }
        int x2 = x + width;
        int y2 = y + height;
        // Convert and clamp top and left border
        x = Math.max(0, x + position.getX());
        y = Math.max(0, y + position.getY());
        // Clamp and convert bottom and right border
        x2 = Math.min(x2, size.getWidth()) + position.getX();
        y2 = Math.min(y2, size.getHeight()) + position.getY();
        // Make sure bottom and top / right and left aren't flipped
        x2 = Math.max(x2, x);
        y2 = Math.max(y2, y);
        // Pass to parent
        renderer.setDrawingArea(x, y, x2 - x, y2 - y);
    }

    public void startUsing() {
        pushScissorState();
        setDrawingArea(0, 0, size.getWidth(), size.getHeight());
    }

    public void stopUsing() {
// Path: src/main/java/de/johni0702/minecraft/gui/versions/MCVer.java
// public static void popScissorState() {
//     setScissorBounds(scissorStateStack.pop());
// }
// 
// Path: src/main/java/de/johni0702/minecraft/gui/versions/MCVer.java
// public static void pushScissorState() {
//     scissorStateStack.push(scissorState);
// }


// Path: src/main/java/de/johni0702/minecraft/gui/OffsetGuiRenderer.java
import net.minecraft.util.Identifier;
import static de.johni0702.minecraft.gui.versions.MCVer.popScissorState;
import static de.johni0702.minecraft.gui.versions.MCVer.pushScissorState;
import de.johni0702.minecraft.gui.utils.NonNull;
import de.johni0702.minecraft.gui.utils.lwjgl.Point;
import de.johni0702.minecraft.gui.utils.lwjgl.ReadableColor;
import de.johni0702.minecraft.gui.utils.lwjgl.ReadableDimension;
import de.johni0702.minecraft.gui.utils.lwjgl.ReadablePoint;
import net.minecraft.client.util.math.MatrixStack;

        return size;
    }

    @Override
    public void setDrawingArea(int x, int y, int width, int height) {
        if (!strict) {
            renderer.setDrawingArea(x + position.getX(), y + position.getY(), width, height);
            return;
        }
        int x2 = x + width;
        int y2 = y + height;
        // Convert and clamp top and left border
        x = Math.max(0, x + position.getX());
        y = Math.max(0, y + position.getY());
        // Clamp and convert bottom and right border
        x2 = Math.min(x2, size.getWidth()) + position.getX();
        y2 = Math.min(y2, size.getHeight()) + position.getY();
        // Make sure bottom and top / right and left aren't flipped
        x2 = Math.max(x2, x);
        y2 = Math.max(y2, y);
        // Pass to parent
        renderer.setDrawingArea(x, y, x2 - x, y2 - y);
    }

    public void startUsing() {
        pushScissorState();
        setDrawingArea(0, 0, size.getWidth(), size.getHeight());
    }

    public void stopUsing() {
        popScissorState();