From 8aa5a6756aa040aa99c79edefa929333668ce1f6 Mon Sep 17 00:00:00 2001 From: Leijurv Date: Mon, 5 Nov 2018 14:41:17 -0800 Subject: [PATCH] add to api --- src/api/java/baritone/api/BaritoneAPI.java | 10 ++++++++++ src/api/java/baritone/api/IBaritone.java | 10 +++++++++- src/main/java/baritone/Baritone.java | 2 ++ 3 files changed, 21 insertions(+), 1 deletion(-) diff --git a/src/api/java/baritone/api/BaritoneAPI.java b/src/api/java/baritone/api/BaritoneAPI.java index bf878d33..b9dbcd04 100644 --- a/src/api/java/baritone/api/BaritoneAPI.java +++ b/src/api/java/baritone/api/BaritoneAPI.java @@ -23,7 +23,9 @@ import baritone.api.behavior.IPathingBehavior; import baritone.api.cache.IWorldProvider; import baritone.api.cache.IWorldScanner; import baritone.api.event.listener.IGameEventListener; +import baritone.api.process.ICustomGoalProcess; import baritone.api.process.IFollowProcess; +import baritone.api.process.IGetToBlockProcess; import baritone.api.process.IMineProcess; import baritone.api.utils.SettingsUtil; @@ -84,6 +86,14 @@ public final class BaritoneAPI { return baritone.getWorldScanner(); } + public static ICustomGoalProcess getCustomGoalProcess() { + return baritone.getCustomGoalProcess(); + } + + public static IGetToBlockProcess getGetToBlockProcess() { + return baritone.getGetToBlockProcess(); + } + public static void registerEventListener(IGameEventListener listener) { baritone.registerEventListener(listener); } diff --git a/src/api/java/baritone/api/IBaritone.java b/src/api/java/baritone/api/IBaritone.java index 2d1982cd..aee9dead 100644 --- a/src/api/java/baritone/api/IBaritone.java +++ b/src/api/java/baritone/api/IBaritone.java @@ -17,11 +17,15 @@ 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.IWorldScanner; import baritone.api.event.listener.IGameEventListener; +import baritone.api.process.ICustomGoalProcess; import baritone.api.process.IFollowProcess; +import baritone.api.process.IGetToBlockProcess; import baritone.api.process.IMineProcess; /** @@ -72,6 +76,10 @@ public interface IBaritone { */ IWorldScanner getWorldScanner(); + ICustomGoalProcess getCustomGoalProcess(); + + IGetToBlockProcess getGetToBlockProcess(); + /** * Registers a {@link IGameEventListener} with Baritone's "event bus". * diff --git a/src/main/java/baritone/Baritone.java b/src/main/java/baritone/Baritone.java index b655dddc..1cd482cf 100755 --- a/src/main/java/baritone/Baritone.java +++ b/src/main/java/baritone/Baritone.java @@ -159,10 +159,12 @@ public enum Baritone implements IBaritone { this.registerEventListener(behavior); } + @Override public CustomGoalProcess getCustomGoalProcess() { return customGoalProcess; } + @Override public GetToBlockProcess getGetToBlockProcess() { // very very high iq return getToBlockProcess; }