mirror of https://github.com/cabaletta/baritone
cherry pick remainWithExistingLookDirection from fork
This commit is contained in:
parent
411c43d90e
commit
6c8f2698d6
|
@ -729,6 +729,12 @@ public final class Settings {
|
|||
*/
|
||||
public final Setting<Boolean> blockFreeLook = new Setting<>(false);
|
||||
|
||||
/**
|
||||
* When true, the player will remain with its existing look direction as often as possible.
|
||||
* Although, in some cases this can get it stuck, hence this setting to disable that behavior.
|
||||
*/
|
||||
public final Setting<Boolean> remainWithExistingLookDirection = new Setting<>(true);
|
||||
|
||||
/**
|
||||
* Will cause some minor behavioral differences to ensure that Baritone works on anticheats.
|
||||
* <p>
|
||||
|
|
|
@ -161,7 +161,7 @@ public final class RotationUtils {
|
|||
}
|
||||
|
||||
public static Optional<Rotation> reachable(IPlayerContext ctx, BlockPos pos, double blockReachDistance, boolean wouldSneak) {
|
||||
if (ctx.isLookingAt(pos)) {
|
||||
if (BaritoneAPI.getSettings().remainWithExistingLookDirection.value && ctx.isLookingAt(pos)) {
|
||||
/*
|
||||
* why add 0.0001?
|
||||
* to indicate that we actually have a desired pitch
|
||||
|
|
Loading…
Reference in New Issue