diff --git a/common/src/main/java/dev/engine_room/flywheel/impl/FlwImpl.java b/common/src/main/java/dev/engine_room/flywheel/impl/FlwImpl.java index 3ee7c6352..a2332d4f9 100644 --- a/common/src/main/java/dev/engine_room/flywheel/impl/FlwImpl.java +++ b/common/src/main/java/dev/engine_room/flywheel/impl/FlwImpl.java @@ -18,8 +18,6 @@ public final class FlwImpl { // impl BackendManagerImpl.init(); - // lib - // backend FlwBackend.init(FlwConfig.INSTANCE.backendConfig()); } diff --git a/fabric/src/main/java/dev/engine_room/flywheel/impl/FabricFlwConfig.java b/fabric/src/main/java/dev/engine_room/flywheel/impl/FabricFlwConfig.java index 2763ae124..a6f17f39a 100644 --- a/fabric/src/main/java/dev/engine_room/flywheel/impl/FabricFlwConfig.java +++ b/fabric/src/main/java/dev/engine_room/flywheel/impl/FabricFlwConfig.java @@ -38,7 +38,8 @@ public class FabricFlwConfig implements FlwConfig { private final File file; - public Backend backend = BackendManager.defaultBackend(); + // Don't actually default to off, we'll find the true default in #load + public Backend backend = BackendManager.offBackend(); public boolean limitUpdates = LIMIT_UPDATES_DEFAULT; public int workerThreads = WORKER_THREADS_DEFAULT; @@ -69,6 +70,10 @@ public class FabricFlwConfig implements FlwConfig { } public void load() { + // Grab the default backend here because this object is constructed + // very early in flywheel loading and not all backends may be registered + backend = BackendManager.defaultBackend(); + if (file.exists()) { try (FileReader reader = new FileReader(file)) { fromJson(JsonParser.parseReader(reader));