mirror of
https://github.com/xiaozhou233/OrangeX-Client.git
synced 2026-12-05 13:05:52 +08:00
fix: snap nametag screen coordinates to pixel grid to eliminate jitter
This commit is contained in:
1 parent
fa31cb8a67
commit
2ebe7fd19c
1 file changed
+2
-2
@@ -79,8 +79,8 @@ public class NameTag extends Module {
|
||||
if (screenZ >= 1.0f) continue;
|
||||
|
||||
int scaleFactor = new ScaledResolution(mc).getScaleFactor();
|
||||
float screenX = screenCoords.get(0) / scaleFactor;
|
||||
float screenY = (mc.displayHeight - screenCoords.get(1)) / scaleFactor;
|
||||
float screenX = (float) Math.floor(screenCoords.get(0) / scaleFactor);
|
||||
float screenY = (float) Math.floor((mc.displayHeight - screenCoords.get(1)) / scaleFactor);
|
||||
|
||||
String name = player.getDisplayName().getFormattedText();
|
||||
String healthText = "";
|
||||
|
||||
Reference in new issue
Block a user