Merge branch 'master' into processes
This commit is contained in:
@@ -97,22 +97,13 @@ public final class LookBehavior extends Behavior implements ILookBehavior, Helpe
|
||||
@Override
|
||||
public void onPlayerRotationMove(RotationMoveEvent event) {
|
||||
if (this.target != null && !this.force) {
|
||||
switch (event.getState()) {
|
||||
case PRE:
|
||||
this.lastYaw = player().rotationYaw;
|
||||
player().rotationYaw = this.target.getYaw();
|
||||
break;
|
||||
case POST:
|
||||
player().rotationYaw = this.lastYaw;
|
||||
|
||||
// If we have antiCheatCompatibility on, we're going to use the target value later in onPlayerUpdate()
|
||||
// Also the type has to be MOTION_UPDATE because that is called after JUMP
|
||||
if (!Baritone.settings().antiCheatCompatibility.get() && event.getType() == RotationMoveEvent.Type.MOTION_UPDATE) {
|
||||
this.target = null;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
event.setYaw(this.target.getYaw());
|
||||
|
||||
// If we have antiCheatCompatibility on, we're going to use the target value later in onPlayerUpdate()
|
||||
// Also the type has to be MOTION_UPDATE because that is called after JUMP
|
||||
if (!Baritone.settings().antiCheatCompatibility.get() && event.getType() == RotationMoveEvent.Type.MOTION_UPDATE) {
|
||||
this.target = null;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -93,7 +93,17 @@ public class MovementParkour extends Movement {
|
||||
if (!MovementHelper.fullyPassable(x, y + 2, z)) {
|
||||
return;
|
||||
}
|
||||
for (int i = 2; i <= (context.canSprint() ? 4 : 3); i++) {
|
||||
int maxJump;
|
||||
if (standingOn.getBlock() == Blocks.SOUL_SAND) {
|
||||
maxJump = 2; // 1 block gap
|
||||
} else {
|
||||
if (context.canSprint()) {
|
||||
maxJump = 4;
|
||||
} else {
|
||||
maxJump = 3;
|
||||
}
|
||||
}
|
||||
for (int i = 2; i <= maxJump; i++) {
|
||||
// TODO perhaps dest.up(3) doesn't need to be fullyPassable, just canWalkThrough, possibly?
|
||||
for (int y2 = 0; y2 < 4; y2++) {
|
||||
if (!MovementHelper.fullyPassable(x + xDiff * i, y + y2, z + zDiff * i)) {
|
||||
@@ -108,7 +118,7 @@ public class MovementParkour extends Movement {
|
||||
return;
|
||||
}
|
||||
}
|
||||
if (!context.canSprint()) {
|
||||
if (maxJump != 4) {
|
||||
return;
|
||||
}
|
||||
if (!Baritone.settings().allowParkourPlace.get()) {
|
||||
|
||||
Reference in New Issue
Block a user