Skip to content

Commit 15c324f

Browse files
authored
[Gui] Restrict facing value to match the f3 gui (#220)
2 parents 96c1cbd + c755f29 commit 15c324f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/com/minecrafttas/tasmod/gui/InfoHud.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
import net.minecraft.client.Minecraft;
2626
import net.minecraft.client.gui.GuiScreen;
2727
import net.minecraft.client.gui.ScaledResolution;
28+
import net.minecraft.util.math.MathHelper;
2829

2930
/**
3031
* The info hud is a hud that is always being rendered ontop of the screen, it can show some stuff such as coordinates, etc.,
@@ -311,7 +312,7 @@ public boolean checkInit() {
311312
+ "_visible")), Boolean.parseBoolean(configuration.getProperty(title + "_rect")), () -> {
312313
if (Minecraft.getMinecraft().currentScreen == this)
313314
return "Facing";
314-
return String.format("%.2f %.2f", Minecraft.getMinecraft().player.rotationYaw, Minecraft.getMinecraft().player.rotationPitch);
315+
return String.format("%.2f %.2f", MathHelper.wrapDegrees(Minecraft.getMinecraft().player.rotationYaw), MathHelper.wrapDegrees(Minecraft.getMinecraft().player.rotationPitch));
315316
}));
316317

317318
title = "camera";

0 commit comments

Comments
 (0)