diff --git a/src/main/java/baritone/Baritone.java b/src/main/java/baritone/Baritone.java index bd5b97e8..42403e84 100755 --- a/src/main/java/baritone/Baritone.java +++ b/src/main/java/baritone/Baritone.java @@ -36,7 +36,7 @@ import baritone.utils.BaritoneAutoTest; import baritone.utils.ExampleBaritoneControl; import baritone.utils.InputOverrideHandler; import baritone.utils.PathingControlManager; -import baritone.utils.player.LocalPlayerContext; +import baritone.utils.player.PrimaryPlayerContext; import net.minecraft.client.Minecraft; import java.io.File; @@ -102,7 +102,7 @@ public class Baritone implements IBaritone { } // Define this before behaviors try and get it, or else it will be null and the builds will fail! - this.playerContext = LocalPlayerContext.INSTANCE; + this.playerContext = PrimaryPlayerContext.INSTANCE; this.behaviors = new ArrayList<>(); { diff --git a/src/main/java/baritone/utils/player/LocalPlayerContext.java b/src/main/java/baritone/utils/player/PrimaryPlayerContext.java similarity index 85% rename from src/main/java/baritone/utils/player/LocalPlayerContext.java rename to src/main/java/baritone/utils/player/PrimaryPlayerContext.java index 02c08c11..4247e92b 100644 --- a/src/main/java/baritone/utils/player/LocalPlayerContext.java +++ b/src/main/java/baritone/utils/player/PrimaryPlayerContext.java @@ -20,7 +20,7 @@ package baritone.utils.player; import baritone.api.BaritoneAPI; import baritone.api.cache.IWorldData; import baritone.api.utils.IPlayerContext; -import net.minecraft.client.Minecraft; +import baritone.utils.Helper; import net.minecraft.client.entity.EntityPlayerSP; import net.minecraft.client.multiplayer.PlayerControllerMP; import net.minecraft.util.math.RayTraceResult; @@ -32,13 +32,9 @@ import net.minecraft.world.World; * @author Brady * @since 11/12/2018 */ -public final class LocalPlayerContext implements IPlayerContext { +public enum PrimaryPlayerContext implements IPlayerContext, Helper { - private static final Minecraft mc = Minecraft.getMinecraft(); - - public static final LocalPlayerContext INSTANCE = new LocalPlayerContext(); - - private LocalPlayerContext() {} + INSTANCE; @Override public EntityPlayerSP player() {