randomlooking

This commit is contained in:
Leijurv
2019-07-11 11:56:44 -07:00
parent d70243b4c0
commit 1427cf57a8
2 changed files with 12 additions and 0 deletions

View File

@@ -50,6 +50,13 @@ public final class LookBehavior extends Behavior implements ILookBehavior {
@Override
public void updateTarget(Rotation target, boolean force) {
this.target = target;
if (!force) {
double rand = Math.random() - 0.5;
if (Math.abs(rand) < 0.1) {
rand *= 4;
}
this.target = new Rotation(this.target.getYaw() + (float) (rand * Baritone.settings().randomLooking.value), this.target.getPitch());
}
this.force = force || !Baritone.settings().freeLook.value;
}