pigs
This commit is contained in:
parent
b75f4bf9a9
commit
314f280400
@ -23,6 +23,7 @@ import baritone.api.event.events.ChatEvent;
|
||||
import baritone.api.event.events.PlayerUpdateEvent;
|
||||
import baritone.api.event.events.SprintStateEvent;
|
||||
import baritone.api.event.events.type.EventState;
|
||||
import baritone.behavior.LookBehavior;
|
||||
import net.minecraft.client.entity.EntityPlayerSP;
|
||||
import net.minecraft.client.settings.KeyBinding;
|
||||
import net.minecraft.entity.player.PlayerCapabilities;
|
||||
@ -102,4 +103,14 @@ public class MixinEntityPlayerSP {
|
||||
BaritoneAPI.getProvider().getBaritoneForPlayer((EntityPlayerSP) (Object) this).getGameEventHandler().onPlayerSprintState(event);
|
||||
return event.getState() == null ? keyBinding.isKeyDown() : event.getState();
|
||||
}
|
||||
|
||||
@Inject(
|
||||
method = "updateRidden",
|
||||
at = @At(
|
||||
value = "HEAD"
|
||||
)
|
||||
)
|
||||
private void updateRidden(CallbackInfo cb) {
|
||||
((LookBehavior) BaritoneAPI.getProvider().getBaritoneForPlayer((EntityPlayerSP) (Object) this).getLookBehavior()).pig();
|
||||
}
|
||||
}
|
||||
|
@ -95,6 +95,12 @@ public final class LookBehavior extends Behavior implements ILookBehavior {
|
||||
}
|
||||
}
|
||||
|
||||
public void pig() {
|
||||
if (this.target != null) {
|
||||
ctx.player().rotationYaw = this.target.getYaw();
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void onPlayerRotationMove(RotationMoveEvent event) {
|
||||
if (this.target != null && !this.force) {
|
||||
|
Loading…
Reference in New Issue
Block a user