Skip to content

Commit

Permalink
Make blockFreeLook depend on freeLook
Browse files Browse the repository at this point in the history
  • Loading branch information
ZeroMemes committed Jul 3, 2023
1 parent 8211ae4 commit 6654476
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
3 changes: 1 addition & 2 deletions src/api/java/baritone/api/Settings.java
Original file line number Diff line number Diff line change
Expand Up @@ -731,8 +731,7 @@ public final class Settings {
public final Setting<Boolean> freeLook = new Setting<>(true);

/**
* Break and place blocks without having to force the client-sided rotations. Having this setting enabled implies
* {@link #freeLook}.
* Break and place blocks without having to force the client-sided rotations. Requires {@link #freeLook}.
*/
public final Setting<Boolean> blockFreeLook = new Setting<>(false);

Expand Down
6 changes: 3 additions & 3 deletions src/main/java/baritone/behavior/LookBehavior.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ public void pig() {
}

public Optional<Rotation> getEffectiveRotation() {
if (Baritone.settings().freeLook.value || Baritone.settings().blockFreeLook.value) {
if (Baritone.settings().freeLook.value) {
return Optional.ofNullable(this.serverRotation);
}
// If neither of the freeLook settings are on, just defer to the player's actual rotations
// If freeLook isn't on, just defer to the player's actual rotations
return Optional.empty();
}

Expand Down Expand Up @@ -306,7 +306,7 @@ static Mode resolve(boolean blockInteract) {
final boolean blockFreeLook = settings.blockFreeLook.value;
final boolean freeLook = settings.freeLook.value;

if (!freeLook && !blockFreeLook) return CLIENT;
if (!freeLook) return CLIENT;
if (!blockFreeLook && blockInteract) return CLIENT;

// Regardless of if antiCheatCompatibility is enabled, if a blockInteract is requested then the player
Expand Down

0 comments on commit 6654476

Please sign in to comment.