From 5617c595b2259fa1838c356f1c37373b5135704c Mon Sep 17 00:00:00 2001 From: Leijurv Date: Tue, 19 Feb 2019 14:43:48 -0800 Subject: [PATCH] public init --- src/api/java/baritone/api/IBaritone.java | 7 +++++++ src/main/java/baritone/Baritone.java | 1 + 2 files changed, 8 insertions(+) diff --git a/src/api/java/baritone/api/IBaritone.java b/src/api/java/baritone/api/IBaritone.java index 6bdb7d10..21157eb1 100644 --- a/src/api/java/baritone/api/IBaritone.java +++ b/src/api/java/baritone/api/IBaritone.java @@ -76,4 +76,11 @@ public interface IBaritone { IPlayerContext getPlayerContext(); IEventBus getGameEventHandler(); + + /** + * Call as soon as Minecraft is ready. + *

+ * Or whenever your overeager utility client wants. + */ + void init(); } diff --git a/src/main/java/baritone/Baritone.java b/src/main/java/baritone/Baritone.java index 3414fdf3..2eb69cba 100755 --- a/src/main/java/baritone/Baritone.java +++ b/src/main/java/baritone/Baritone.java @@ -92,6 +92,7 @@ public class Baritone implements IBaritone { this.gameEventHandler = new GameEventHandler(this); } + @Override public synchronized void init() { if (initialized) { return;