From 0302c6f14b6b0abef95c281d69e7423c7345419b Mon Sep 17 00:00:00 2001 From: Brady Date: Tue, 13 Nov 2018 21:56:57 -0600 Subject: [PATCH] Fix really really bad error mega critical --- src/main/java/baritone/Baritone.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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) {