From 5162fff39b724793257490ee53d190d93dac7f7f Mon Sep 17 00:00:00 2001 From: Kam Date: Tue, 6 Jun 2023 01:34:27 -0400 Subject: [PATCH] Fix Weird ID for Label and Line --- .../client/gui/customoverlay/components/CustomOverlayLabel.java | 2 +- .../client/gui/customoverlay/components/CustomOverlayLine.java | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/noppes/npcs/client/gui/customoverlay/components/CustomOverlayLabel.java b/src/main/java/noppes/npcs/client/gui/customoverlay/components/CustomOverlayLabel.java index ce55d6438..a0d135f2e 100644 --- a/src/main/java/noppes/npcs/client/gui/customoverlay/components/CustomOverlayLabel.java +++ b/src/main/java/noppes/npcs/client/gui/customoverlay/components/CustomOverlayLabel.java @@ -152,7 +152,7 @@ public class CustomOverlayLabel extends Gui implements IOverlayComponent { green = (color >> 8 & 255) / 255f; blue = (color & 255) / 255f; - GL11.glTranslatef(this.x,this.y,0.0F); + GL11.glTranslatef(this.x,this.y, (float) this.id); GL11.glRotated(rotation,0.0D,0.0D,1.0D); GL11.glScalef(this.scale, this.scale, this.scale); this.drawString(fullLabel, 0, 0, this.color, this.labelShadowEnabled); diff --git a/src/main/java/noppes/npcs/client/gui/customoverlay/components/CustomOverlayLine.java b/src/main/java/noppes/npcs/client/gui/customoverlay/components/CustomOverlayLine.java index 40826ec89..69e917f3b 100644 --- a/src/main/java/noppes/npcs/client/gui/customoverlay/components/CustomOverlayLine.java +++ b/src/main/java/noppes/npcs/client/gui/customoverlay/components/CustomOverlayLine.java @@ -52,7 +52,7 @@ public class CustomOverlayLine extends Gui implements IOverlayComponent { float blue = (color & 255) / 255f; GL11.glTranslatef(this.alignment%3*((float)(OverlayCustom.scaledWidth)/2), (float) (Math.floor((float)(alignment/3))*((float)(OverlayCustom.scaledHeight)/2)),0.0F);//alignment%3 * width/2 Math.floor(alignment/3) * height/2 - GL11.glTranslatef(this.x1,this.y1,0.0F); + GL11.glTranslatef(this.x1,this.y1, (float) this.id); GL11.glRotated(-Math.toDegrees(Math.atan2(x2-x1,y2-y1)),0.0F,0.0F,1.0F); GL11.glRotated(rotation,0.0D,0.0D,1.0D);