Fix last commit lol

This commit is contained in:
Brady 2018-11-05 13:53:26 -06:00
parent ffb044ffc6
commit c0e0f8dc2a
No known key found for this signature in database
GPG Key ID: 73A788379A197567
2 changed files with 15 additions and 15 deletions

View File

@ -44,6 +44,15 @@ public final class RotationMoveEvent extends ManagedPlayerEvent {
this.yaw = yaw;
}
/**
* Set the yaw movement rotation
*
* @param yaw Yaw rotation
*/
public final void setYaw(float yaw) {
this.yaw = yaw;
}
/**
* @return The yaw rotation
*/

View File

@ -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;
}
}
}