remove Baritone.INSTANCE

This commit is contained in:
Leijurv 2018-11-13 21:34:11 -08:00
parent f6891feb64
commit c74ccaafbf
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
2 changed files with 7 additions and 10 deletions

View File

@ -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;

View File

@ -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<IBaritone> 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