mirror of https://github.com/cabaletta/baritone
notificationOnPathComplete and disconnectOnArrival
This commit is contained in:
parent
38553b3324
commit
0239a2cad4
|
@ -94,6 +94,15 @@ public class ElytraProcess extends BaritoneProcessHelper implements IBaritonePro
|
|||
if (ctx.player().isElytraFlying()) {
|
||||
final BetterBlockPos last = behavior.pathManager.path.getLast();
|
||||
if (last != null && ctx.player().getDistanceSqToCenter(last) < (5 * 5)) {
|
||||
if (Baritone.settings().notificationOnPathComplete.value) {
|
||||
logNotification("Pathing complete", false);
|
||||
}
|
||||
if (Baritone.settings().disconnectOnArrival.value) {
|
||||
// don't be active when the user logs back in
|
||||
this.onLostControl();
|
||||
ctx.world().sendQuittingDisconnectingPacket();
|
||||
return new PathingCommand(null, PathingCommandType.CANCEL_AND_SET_GOAL);
|
||||
}
|
||||
this.state = State.LANDING;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue