UTILIZE Service Loaders

https://i.imgur.com/kAm0xd3.png
This commit is contained in:
Brady
2018-09-29 23:52:01 -05:00
parent bcb95c55c9
commit b12c2ea62f
5 changed files with 129 additions and 55 deletions

View File

@@ -88,8 +88,6 @@ public enum Baritone {
// We might want to change this...
this.settings = BaritoneAPI.getSettings();
BaritoneAPI.registerProviders(WorldProvider.INSTANCE);
this.behaviors = new ArrayList<>();
{
registerBehavior(PathingBehavior.INSTANCE);
@@ -98,16 +96,6 @@ public enum Baritone {
registerBehavior(LocationTrackingBehavior.INSTANCE);
registerBehavior(FollowBehavior.INSTANCE);
registerBehavior(MineBehavior.INSTANCE);
// TODO: Clean this up
// Maybe combine this call in someway with the registerBehavior calls?
BaritoneAPI.registerDefaultBehaviors(
FollowBehavior.INSTANCE,
LookBehavior.INSTANCE,
MemoryBehavior.INSTANCE,
MineBehavior.INSTANCE,
PathingBehavior.INSTANCE
);
}
if (BaritoneAutoTest.ENABLE_AUTO_TEST) {
registerEventListener(BaritoneAutoTest.INSTANCE);