add to api

This commit is contained in:
Leijurv 2018-11-05 14:41:17 -08:00
parent 23286dd8b8
commit 8aa5a6756a
No known key found for this signature in database
GPG Key ID: 44A3EA646EADAC6A
3 changed files with 21 additions and 1 deletions

View File

@ -23,7 +23,9 @@ import baritone.api.behavior.IPathingBehavior;
import baritone.api.cache.IWorldProvider; import baritone.api.cache.IWorldProvider;
import baritone.api.cache.IWorldScanner; import baritone.api.cache.IWorldScanner;
import baritone.api.event.listener.IGameEventListener; import baritone.api.event.listener.IGameEventListener;
import baritone.api.process.ICustomGoalProcess;
import baritone.api.process.IFollowProcess; import baritone.api.process.IFollowProcess;
import baritone.api.process.IGetToBlockProcess;
import baritone.api.process.IMineProcess; import baritone.api.process.IMineProcess;
import baritone.api.utils.SettingsUtil; import baritone.api.utils.SettingsUtil;
@ -84,6 +86,14 @@ public final class BaritoneAPI {
return baritone.getWorldScanner(); return baritone.getWorldScanner();
} }
public static ICustomGoalProcess getCustomGoalProcess() {
return baritone.getCustomGoalProcess();
}
public static IGetToBlockProcess getGetToBlockProcess() {
return baritone.getGetToBlockProcess();
}
public static void registerEventListener(IGameEventListener listener) { public static void registerEventListener(IGameEventListener listener) {
baritone.registerEventListener(listener); baritone.registerEventListener(listener);
} }

View File

@ -17,11 +17,15 @@
package baritone.api; package baritone.api;
import baritone.api.behavior.*; import baritone.api.behavior.ILookBehavior;
import baritone.api.behavior.IMemoryBehavior;
import baritone.api.behavior.IPathingBehavior;
import baritone.api.cache.IWorldProvider; import baritone.api.cache.IWorldProvider;
import baritone.api.cache.IWorldScanner; import baritone.api.cache.IWorldScanner;
import baritone.api.event.listener.IGameEventListener; import baritone.api.event.listener.IGameEventListener;
import baritone.api.process.ICustomGoalProcess;
import baritone.api.process.IFollowProcess; import baritone.api.process.IFollowProcess;
import baritone.api.process.IGetToBlockProcess;
import baritone.api.process.IMineProcess; import baritone.api.process.IMineProcess;
/** /**
@ -72,6 +76,10 @@ public interface IBaritone {
*/ */
IWorldScanner getWorldScanner(); IWorldScanner getWorldScanner();
ICustomGoalProcess getCustomGoalProcess();
IGetToBlockProcess getGetToBlockProcess();
/** /**
* Registers a {@link IGameEventListener} with Baritone's "event bus". * Registers a {@link IGameEventListener} with Baritone's "event bus".
* *

View File

@ -159,10 +159,12 @@ public enum Baritone implements IBaritone {
this.registerEventListener(behavior); this.registerEventListener(behavior);
} }
@Override
public CustomGoalProcess getCustomGoalProcess() { public CustomGoalProcess getCustomGoalProcess() {
return customGoalProcess; return customGoalProcess;
} }
@Override
public GetToBlockProcess getGetToBlockProcess() { // very very high iq public GetToBlockProcess getGetToBlockProcess() { // very very high iq
return getToBlockProcess; return getToBlockProcess;
} }