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,23 +97,14 @@ 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:
|
event.setYaw(this.target.getYaw());
|
||||||
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()
|
// 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
|
// 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 (!Baritone.settings().antiCheatCompatibility.get() && event.getType() == RotationMoveEvent.Type.MOTION_UPDATE) {
|
||||||
this.target = null;
|
this.target = null;
|
||||||
}
|
}
|
||||||
break;
|
|
||||||
default:
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user