Skip to content

Commit

Permalink
Fix 1.17 build
Browse files Browse the repository at this point in the history
  • Loading branch information
zbx1425 committed Jun 21, 2024
1 parent a10671e commit 31187b3
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -195,10 +195,10 @@ public static void enableScissor(float x, float y, float width, float height) {
bottomLeft.transform(posMap);
Vector4f topRight = new Vector4f(x + width, y, 0, 1);
topRight.transform(posMap);
float x1 = Mth.map(bottomLeft.x(), -1, 1, 0, Minecraft.getInstance().getWindow().getWidth());
float y1 = Mth.map(bottomLeft.y(), -1, 1, 0, Minecraft.getInstance().getWindow().getHeight());
float x2 = Mth.map(topRight.x(), -1, 1, 0, Minecraft.getInstance().getWindow().getWidth());
float y2 = Mth.map(topRight.y(), -1, 1, 0, Minecraft.getInstance().getWindow().getHeight());
float x1 = (float)Mth.map(bottomLeft.x(), -1, 1, 0, Minecraft.getInstance().getWindow().getWidth());
float y1 = (float)Mth.map(bottomLeft.y(), -1, 1, 0, Minecraft.getInstance().getWindow().getHeight());
float x2 = (float)Mth.map(topRight.x(), -1, 1, 0, Minecraft.getInstance().getWindow().getWidth());
float y2 = (float)Mth.map(topRight.y(), -1, 1, 0, Minecraft.getInstance().getWindow().getHeight());
RenderSystem.enableScissor((int)x1, (int)y1, (int)(x2 - x1), (int)(y2 - y1));
}

Expand Down

0 comments on commit 31187b3

Please sign in to comment.