misc cleanup

This commit is contained in:
Leijurv
2018-11-05 20:01:46 -08:00
parent 6ca7f47bf9
commit 604ef2bb64
8 changed files with 22 additions and 22 deletions

View File

@@ -67,7 +67,7 @@ public enum Baritone implements IBaritone {
private GameEventHandler gameEventHandler;
private Settings settings;
private File dir;
private ThreadPoolExecutor threadPool;
private List<Behavior> behaviors;
private PathingBehavior pathingBehavior;
@@ -82,16 +82,16 @@ public enum Baritone implements IBaritone {
private PathingControlManager pathingControlManager;
private static ThreadPoolExecutor threadPool = new ThreadPoolExecutor(4, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS, new SynchronousQueue<>());
Baritone() {
this.gameEventHandler = new GameEventHandler();
this.gameEventHandler = new GameEventHandler(this);
}
public synchronized void init() {
if (initialized) {
return;
}
this.threadPool = new ThreadPoolExecutor(4, Integer.MAX_VALUE, 60L, TimeUnit.SECONDS, new SynchronousQueue<>());
// Acquire the "singleton" instance of the settings directly from the API
// We might want to change this...
@@ -148,7 +148,7 @@ public enum Baritone implements IBaritone {
return this.behaviors;
}
public Executor getExecutor() {
public static Executor getExecutor() {
return threadPool;
}
@@ -215,7 +215,7 @@ public enum Baritone implements IBaritone {
return Baritone.INSTANCE.settings; // yolo
}
public File getDir() {
return this.dir;
public static File getDir() {
return Baritone.INSTANCE.dir; // should be static I guess
}
}