mirror of
https://github.com/cabaletta/baritone
synced 2024-12-26 17:02:24 +00:00
possible fix to concurrentmodificationexception on path start
This commit is contained in:
parent
f51bcc8b89
commit
438392840b
@ -21,6 +21,7 @@ import baritone.api.event.GameEventHandler;
|
||||
import baritone.behavior.Behavior;
|
||||
import baritone.behavior.impl.*;
|
||||
import baritone.utils.InputOverrideHandler;
|
||||
import baritone.utils.ToolSet;
|
||||
import net.minecraft.client.Minecraft;
|
||||
|
||||
import java.io.File;
|
||||
@ -81,6 +82,7 @@ public enum Baritone {
|
||||
registerBehavior(LocationTrackingBehavior.INSTANCE);
|
||||
registerBehavior(FollowBehavior.INSTANCE);
|
||||
registerBehavior(MineBehavior.INSTANCE);
|
||||
this.gameEventHandler.registerEventListener(ToolSet.INTERNAL_EVENT_LISTENER);
|
||||
}
|
||||
this.dir = new File(Minecraft.getMinecraft().gameDir, "baritone");
|
||||
if (!Files.exists(dir.toPath())) {
|
||||
|
@ -17,7 +17,6 @@
|
||||
|
||||
package baritone.utils;
|
||||
|
||||
import baritone.Baritone;
|
||||
import baritone.api.event.events.ItemSlotEvent;
|
||||
import baritone.api.event.listener.AbstractGameEventListener;
|
||||
import net.minecraft.block.Block;
|
||||
@ -46,11 +45,7 @@ public class ToolSet implements Helper {
|
||||
/**
|
||||
* Instance of the internal event listener used to hook into Baritone's event bus
|
||||
*/
|
||||
private static final InternalEventListener INTERNAL_EVENT_LISTENER = new InternalEventListener();
|
||||
|
||||
static {
|
||||
Baritone.INSTANCE.getGameEventHandler().registerEventListener(INTERNAL_EVENT_LISTENER);
|
||||
}
|
||||
public static final InternalEventListener INTERNAL_EVENT_LISTENER = new InternalEventListener();
|
||||
|
||||
/**
|
||||
* A list of tools on the hotbar that should be considered.
|
||||
|
Loading…
Reference in New Issue
Block a user