From c74ccaafbf61dbeac007db4e9e7b62670133691d Mon Sep 17 00:00:00 2001 From: Leijurv Date: Tue, 13 Nov 2018 21:34:11 -0800 Subject: [PATCH] remove Baritone.INSTANCE --- src/main/java/baritone/Baritone.java | 8 +------- src/main/java/baritone/BaritoneProvider.java | 9 ++++++--- 2 files changed, 7 insertions(+), 10 deletions(-) diff --git a/src/main/java/baritone/Baritone.java b/src/main/java/baritone/Baritone.java index ebedf46f..c5c1b3ed 100755 --- a/src/main/java/baritone/Baritone.java +++ b/src/main/java/baritone/Baritone.java @@ -27,7 +27,6 @@ import baritone.behavior.LookBehavior; import baritone.behavior.MemoryBehavior; import baritone.behavior.PathingBehavior; import baritone.cache.WorldProvider; -import baritone.cache.WorldScanner; import baritone.event.GameEventHandler; import baritone.process.CustomGoalProcess; import baritone.process.FollowProcess; @@ -54,12 +53,7 @@ import java.util.concurrent.TimeUnit; * @author Brady * @since 7/31/2018 */ -public enum Baritone implements IBaritone { - - /** - * Singleton instance of this class - */ - INSTANCE; +public class Baritone implements IBaritone { private static ThreadPoolExecutor threadPool; private static File dir; diff --git a/src/main/java/baritone/BaritoneProvider.java b/src/main/java/baritone/BaritoneProvider.java index af1d0331..93f8faed 100644 --- a/src/main/java/baritone/BaritoneProvider.java +++ b/src/main/java/baritone/BaritoneProvider.java @@ -32,19 +32,22 @@ import java.util.Set; */ public final class BaritoneProvider implements IBaritoneProvider { + private final Baritone primary = new Baritone(); + @Override public IBaritone getPrimaryBaritone() { - return Baritone.INSTANCE; + return primary; } @Override public Set getAllBaritones() { - return Collections.singleton(Baritone.INSTANCE); + return Collections.singleton(primary); } @Override public IBaritone getBaritoneForPlayer(EntityPlayerSP player) { - return Baritone.INSTANCE; + // TODO implement on bot-system branch + return primary; } @Override