From dcc37d6fadab276ccb052e244ae9a90668af2105 Mon Sep 17 00:00:00 2001 From: Kam Date: Sat, 16 Mar 2024 05:04:19 -0400 Subject: [PATCH] Fix GUI Textured Scaling with Offset Textures --- .../gui/custom/components/CustomGuiTexturedRect.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/noppes/npcs/client/gui/custom/components/CustomGuiTexturedRect.java b/src/main/java/noppes/npcs/client/gui/custom/components/CustomGuiTexturedRect.java index cab63a372..4d8502a8b 100644 --- a/src/main/java/noppes/npcs/client/gui/custom/components/CustomGuiTexturedRect.java +++ b/src/main/java/noppes/npcs/client/gui/custom/components/CustomGuiTexturedRect.java @@ -89,10 +89,10 @@ public class CustomGuiTexturedRect extends Gui implements IGuiComponent { tessellator.startDrawingQuads(); tessellator.setColorOpaque_F(1, 1, 1); tessellator.setColorRGBA_F(red, green, blue, alpha); - tessellator.addVertexWithUV(u2 * totalWidth, v2 * totalHeight, 0, u2, v2); - tessellator.addVertexWithUV(u2 * totalWidth, v1 * totalHeight, 0, u2, v1); - tessellator.addVertexWithUV(u1 * totalWidth, v1 * totalHeight, 0, u1, v1); - tessellator.addVertexWithUV(u1 * totalWidth, v2 * totalHeight, 0, u1, v2); + tessellator.addVertexWithUV(0, height, 0, u1, v2); + tessellator.addVertexWithUV(width, height, 0, u2, v2); + tessellator.addVertexWithUV(width, 0, 0, u2, v1); + tessellator.addVertexWithUV(0, 0, 0, u1, v1); tessellator.draw(); GL11.glPopMatrix(); }