diff --git a/src/main/java/com/minecrafttas/tasmod/gui/InfoHud.java b/src/main/java/com/minecrafttas/tasmod/gui/InfoHud.java index c7b04baf..c9abd626 100644 --- a/src/main/java/com/minecrafttas/tasmod/gui/InfoHud.java +++ b/src/main/java/com/minecrafttas/tasmod/gui/InfoHud.java @@ -316,7 +316,7 @@ public boolean checkInit() { + "_visible")), Boolean.parseBoolean(configuration.getProperty(title + "_rect")), () -> { if (Minecraft.getMinecraft().currentScreen == this) return "Facing"; - return String.format("%.2f %.2f", MathHelper.wrapDegrees(Minecraft.getMinecraft().player.rotationYaw), MathHelper.wrapDegrees(Minecraft.getMinecraft().player.rotationPitch)); + return String.format("%.2f %.2f", MathHelper.wrapDegrees(TASmodClient.virtual.CAMERA_ANGLE.getCurrentYaw()), MathHelper.wrapDegrees(TASmodClient.virtual.CAMERA_ANGLE.getCurrentPitch())); })); title = "camera"; @@ -327,7 +327,7 @@ public boolean checkInit() { + "_visible")), Boolean.parseBoolean(configuration.getProperty(title + "_rect")), () -> { if (Minecraft.getMinecraft().currentScreen == this) return "Camera"; - return String.format("%.2f %.2f", TASmodClient.virtual.CAMERA_ANGLE.getCurrentYaw(), TASmodClient.virtual.CAMERA_ANGLE.getCurrentPitch()); + return String.format("%.2f %.2f", MathHelper.wrapDegrees(TASmodClient.virtual.CAMERA_ANGLE.getNextYaw()), MathHelper.wrapDegrees(TASmodClient.virtual.CAMERA_ANGLE.getNextPitch())); })); title = "cticks"; diff --git a/src/main/java/com/minecrafttas/tasmod/virtual/VirtualInput.java b/src/main/java/com/minecrafttas/tasmod/virtual/VirtualInput.java index 377f4c35..bfd20005 100644 --- a/src/main/java/com/minecrafttas/tasmod/virtual/VirtualInput.java +++ b/src/main/java/com/minecrafttas/tasmod/virtual/VirtualInput.java @@ -684,19 +684,33 @@ public void setCamera(Float pitch, Float yaw) { } /** - * @return The absolute pitch coordinate of the player. May be null when it's initialized + * @return The current pitch coordinate of the player. May be null when it's initialized */ public Float getCurrentPitch() { return currentCameraAngle.getPitch(); } /** - * @return The absolute yaw coordinate of the player. May be null when it's initialized + * @return The current yaw coordinate of the player. May be null when it's initialized */ public Float getCurrentYaw() { return currentCameraAngle.getYaw(); } + /** + * @return The pitch coordinate of the player in the next tick. May be null when it's initialized + */ + public Float getNextPitch() { + return nextCameraAngle.getPitch(); + } + + /** + * @return The yaw coordinate of the player in the next tick. May be null when it's initialized + */ + public Float getNextYaw() { + return nextCameraAngle.getYaw(); + } + /** * Clears the {@link #nextCameraAngle} */