Expose all possible Baritone instances
This commit is contained in:
@@ -95,6 +95,7 @@ public enum Baritone implements IBaritone {
|
||||
|
||||
private PathingControlManager pathingControlManager;
|
||||
|
||||
private IPlayerContext playerContext;
|
||||
private WorldProvider worldProvider;
|
||||
|
||||
Baritone() {
|
||||
@@ -124,6 +125,7 @@ public enum Baritone implements IBaritone {
|
||||
getToBlockProcess = new GetToBlockProcess(this);
|
||||
}
|
||||
|
||||
this.playerContext = LocalPlayerContext.INSTANCE;
|
||||
this.worldProvider = new WorldProvider();
|
||||
|
||||
if (BaritoneAutoTest.ENABLE_AUTO_TEST) {
|
||||
@@ -141,11 +143,6 @@ public enum Baritone implements IBaritone {
|
||||
return this.gameEventHandler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputOverrideHandler getInputOverrideHandler() {
|
||||
return this.inputOverrideHandler;
|
||||
}
|
||||
|
||||
public List<Behavior> getBehaviors() {
|
||||
return this.behaviors;
|
||||
}
|
||||
@@ -155,6 +152,11 @@ public enum Baritone implements IBaritone {
|
||||
this.registerEventListener(behavior);
|
||||
}
|
||||
|
||||
@Override
|
||||
public InputOverrideHandler getInputOverrideHandler() {
|
||||
return this.inputOverrideHandler;
|
||||
}
|
||||
|
||||
@Override
|
||||
public CustomGoalProcess getCustomGoalProcess() { // Iffy
|
||||
return customGoalProcess;
|
||||
@@ -167,7 +169,7 @@ public enum Baritone implements IBaritone {
|
||||
|
||||
@Override
|
||||
public IPlayerContext getPlayerContext() {
|
||||
return LocalPlayerContext.INSTANCE;
|
||||
return playerContext;
|
||||
}
|
||||
|
||||
@Override
|
||||
@@ -200,16 +202,6 @@ public enum Baritone implements IBaritone {
|
||||
return worldProvider;
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO-yeet This shouldn't be baritone-instance specific
|
||||
*
|
||||
* @return world scanner instance
|
||||
*/
|
||||
@Override
|
||||
public WorldScanner getWorldScanner() {
|
||||
return WorldScanner.INSTANCE;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void registerEventListener(IGameEventListener listener) {
|
||||
this.gameEventHandler.registerEventListener(listener);
|
||||
|
||||
Reference in New Issue
Block a user