fix disconnect on arrival not firing for custom goal process

This commit is contained in:
Leijurv 2019-03-21 15:44:20 -07:00
parent cac653ddd9
commit bd64f73842
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A

View File

@ -90,6 +90,9 @@ public class CustomGoalProcess extends BaritoneProcessHelper implements ICustomG
} }
if (this.goal == null || (this.goal.isInGoal(ctx.playerFeet()) && this.goal.isInGoal(baritone.getPathingBehavior().pathStart()))) { if (this.goal == null || (this.goal.isInGoal(ctx.playerFeet()) && this.goal.isInGoal(baritone.getPathingBehavior().pathStart()))) {
onLostControl(); // we're there xd onLostControl(); // we're there xd
if (Baritone.settings().disconnectOnArrival.value) {
ctx.world().sendQuittingDisconnectingPacket();
}
return new PathingCommand(this.goal, PathingCommandType.CANCEL_AND_SET_GOAL); return new PathingCommand(this.goal, PathingCommandType.CANCEL_AND_SET_GOAL);
} }
return new PathingCommand(this.goal, PathingCommandType.SET_GOAL_AND_PATH); return new PathingCommand(this.goal, PathingCommandType.SET_GOAL_AND_PATH);