Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/main/java/com/minecrafttas/tasmod/gui/InfoHud.java
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand All @@ -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";
Expand Down
18 changes: 16 additions & 2 deletions src/main/java/com/minecrafttas/tasmod/virtual/VirtualInput.java
Original file line number Diff line number Diff line change
Expand Up @@ -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}
*/
Expand Down