Fix really really bad error mega critical

This commit is contained in:
Brady 2018-11-13 21:56:57 -06:00
parent a0dd43244c
commit 0302c6f14b
No known key found for this signature in database
GPG Key ID: 73A788379A197567

View File

@ -107,6 +107,9 @@ public enum Baritone implements IBaritone {
return;
}
// Define this before behaviors try and get it, or else it will be null and the builds will fail!
this.playerContext = LocalPlayerContext.INSTANCE;
this.behaviors = new ArrayList<>();
{
// the Behavior constructor calls baritone.registerBehavior(this) so this populates the behaviors arraylist
@ -125,7 +128,6 @@ public enum Baritone implements IBaritone {
getToBlockProcess = new GetToBlockProcess(this);
}
this.playerContext = LocalPlayerContext.INSTANCE;
this.worldProvider = new WorldProvider();
if (BaritoneAutoTest.ENABLE_AUTO_TEST) {