Skip to content

Commit 94a8f3c

Browse files
committed
baritone rotation improvements / fixes
1 parent a4d5ed1 commit 94a8f3c

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

src/main/java/com/lambda/mixin/baritone/MixinLookBehavior.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ void onTargetUpdate(Rotation rotation, boolean blockInteract, CallbackInfo ci) {
3636
LookBehavior instance = ((LookBehavior) (Object) this);
3737
if (instance.baritone != BaritoneManager.getPrimary()) return;
3838

39-
RotationManager.handleBaritoneRotation(rotation.getYaw());
39+
RotationManager.handleBaritoneRotation(rotation.getYaw(), rotation.getPitch());
4040
ci.cancel();
4141
}
4242

src/main/kotlin/com/lambda/interaction/managers/rotating/RotationManager.kt

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -174,10 +174,12 @@ object RotationManager : Manager<RotationRequest>(
174174
}
175175

176176
@JvmStatic
177-
fun handleBaritoneRotation(yaw: Float) {
177+
fun handleBaritoneRotation(yaw: Double, pitch: Double) {
178178
runSafe {
179-
activeRequest = lookAt(Rotation(yaw, player.pitch)).requestBy(BaritoneManager)
180179
usingBaritoneRotation = true
180+
activeRequest = RotationRequest(lookAt(Rotation(yaw, pitch)), BaritoneManager)
181+
updateActiveRotation()
182+
changedThisTick = true
181183
}
182184
}
183185

0 commit comments

Comments
 (0)