Don't call onLostControl on processes that haven't been fully constructed

This commit is contained in:
Babbaj 2020-09-13 18:21:22 -04:00
parent 175df6ce7a
commit 32ef30686b
No known key found for this signature in database
GPG Key ID: 48FD0BEFD63C8E3F
2 changed files with 8 additions and 9 deletions

View File

@ -104,14 +104,14 @@ public class Baritone implements IBaritone {
this.pathingControlManager = new PathingControlManager(this);
{
followProcess = new FollowProcess(this);
mineProcess = new MineProcess(this);
customGoalProcess = new CustomGoalProcess(this); // very high iq
getToBlockProcess = new GetToBlockProcess(this);
builderProcess = new BuilderProcess(this);
exploreProcess = new ExploreProcess(this);
backfillProcess = new BackfillProcess(this);
farmProcess = new FarmProcess(this);
this.getPathingControlManager().registerProcess(followProcess = new FollowProcess(this));
this.getPathingControlManager().registerProcess(mineProcess = new MineProcess(this));
this.getPathingControlManager().registerProcess(customGoalProcess = new CustomGoalProcess(this)); // very high iq
this.getPathingControlManager().registerProcess(getToBlockProcess = new GetToBlockProcess(this));
this.getPathingControlManager().registerProcess(builderProcess = new BuilderProcess(this));
this.getPathingControlManager().registerProcess(exploreProcess = new ExploreProcess(this));
this.getPathingControlManager().registerProcess(backfillProcess = new BackfillProcess(this));
this.getPathingControlManager().registerProcess(farmProcess = new FarmProcess(this));
}
this.worldProvider = new WorldProvider();

View File

@ -30,7 +30,6 @@ public abstract class BaritoneProcessHelper implements IBaritoneProcess, Helper
public BaritoneProcessHelper(Baritone baritone) {
this.baritone = baritone;
this.ctx = baritone.getPlayerContext();
baritone.getPathingControlManager().registerProcess(this);
}
@Override