Skip to content

Commit

Permalink
[VirtualInput] Fixed camera spinning uncontrollably
Browse files Browse the repository at this point in the history
  • Loading branch information
ScribbleTAS committed Feb 10, 2024
1 parent 2a99241 commit 7506fe1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ public void copyFrom(VirtualCameraAngle camera) {
this.subtickList.clear();
this.subtickList.addAll(camera.subtickList);
camera.subtickList.clear();
camera.pitch = 0f;
camera.yaw = 0f;
camera.resetFirstUpdate();
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -484,6 +484,7 @@ public VirtualCameraAngleInput(VirtualCameraAngle preloadedCamera) {
}

public void updateNextCameraAngle(float pitch, float yaw) {
LOGGER.debug("Pitch: {}, Yaw: {}", pitch, yaw);
nextCameraAngle.update(pitch, yaw);
}

Expand Down
1 change: 0 additions & 1 deletion src/main/resources/mctcommon.mixin.json
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
"MixinMinecraft",
"MixinNetHandlerPlayClient",
"MixinWorldClient",
"MixinEntityRenderer",
"MixinLocale"
]
}

0 comments on commit 7506fe1

Please sign in to comment.