diff --git a/src/main/java/baritone/Baritone.java b/src/main/java/baritone/Baritone.java index 4f24f6d0..ebedf46f 100755 --- a/src/main/java/baritone/Baritone.java +++ b/src/main/java/baritone/Baritone.java @@ -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) {