Fix onPlayerUpdate not being called

This commit is contained in:
Brady 2018-08-06 18:56:57 -05:00
parent d8a99f8459
commit 1332dd573e
No known key found for this signature in database
GPG Key ID: 73A788379A197567
2 changed files with 4 additions and 8 deletions

View File

@ -1,7 +1,6 @@
package baritone.bot.behavior.impl;
import baritone.bot.behavior.Behavior;
import baritone.bot.event.events.TickEvent;
import baritone.bot.utils.Rotation;
public class LookBehavior extends Behavior {
@ -22,11 +21,6 @@ public class LookBehavior extends Behavior {
this.target = target;
}
@Override
public void onTick(TickEvent event) {
this.onPlayerUpdate();
}
@Override
public void onPlayerUpdate() {
if (target != null) {

View File

@ -30,8 +30,10 @@ public class MixinEntityPlayerSP {
@Inject(
method = "onUpdate",
at = @At(
value = "INVOKE_ASSIGN",
target = "Lnet/minecraft/client/entity/AbstractClientPlayer;onUpdate()V"
value = "INVOKE",
target = "net/minecraft/client/entity/EntityPlayerSP.isRiding()Z",
shift = At.Shift.BY,
by = -3
)
)
private void onUpdate(CallbackInfo ci) {