Fix last commit lol
This commit is contained in:
parent
ffb044ffc6
commit
c0e0f8dc2a
@ -44,6 +44,15 @@ public final class RotationMoveEvent extends ManagedPlayerEvent {
|
|||||||
this.yaw = yaw;
|
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
|
* @return The yaw rotation
|
||||||
*/
|
*/
|
||||||
|
@ -97,22 +97,13 @@ public final class LookBehavior extends Behavior implements ILookBehavior, Helpe
|
|||||||
@Override
|
@Override
|
||||||
public void onPlayerRotationMove(RotationMoveEvent event) {
|
public void onPlayerRotationMove(RotationMoveEvent event) {
|
||||||
if (this.target != null && !this.force) {
|
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()
|
event.setYaw(this.target.getYaw());
|
||||||
// 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) {
|
// If we have antiCheatCompatibility on, we're going to use the target value later in onPlayerUpdate()
|
||||||
this.target = null;
|
// 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) {
|
||||||
break;
|
this.target = null;
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user