disconnect on arrival

This commit is contained in:
Leijurv 2019-03-06 22:44:57 -08:00
parent 74d7483b3c
commit d80ae57964
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 8 additions and 0 deletions

View File

@ -570,6 +570,11 @@ public final class Settings {
*/
public final Setting<Integer> axisHeight = new Setting<>(120);
/**
* Disconnect from the server upon arriving at your goal
*/
public final Setting<Boolean> disconnectOnArrival = new Setting<>(false);
/**
* Disallow MineBehavior from using X-Ray to see where the ores are. Turn this option on to force it to mine "legit"
* where it will only mine an ore once it can actually see it, so it won't do or know anything that a normal player

View File

@ -141,6 +141,9 @@ public final class PathingBehavior extends Behavior implements IPathingBehavior,
logDebug("All done. At " + goal);
queuePathEvent(PathEvent.AT_GOAL);
next = null;
if (Baritone.settings().disconnectOnArrival.value) {
ctx.world().sendQuittingDisconnectingPacket();
}
return;
}
if (next != null && !next.getPath().positions().contains(ctx.playerFeet()) && !next.getPath().positions().contains(expectedSegmentStart)) { // can contain either one