File tree 2 files changed +6
-3
lines changed
common/src/main/java/dev/engine_room/flywheel/impl
fabric/src/main/java/dev/engine_room/flywheel/impl
2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -18,8 +18,6 @@ public static void init() {
18
18
// impl
19
19
BackendManagerImpl .init ();
20
20
21
- // lib
22
-
23
21
// backend
24
22
FlwBackend .init (FlwConfig .INSTANCE .backendConfig ());
25
23
}
Original file line number Diff line number Diff line change @@ -38,7 +38,8 @@ public class FabricFlwConfig implements FlwConfig {
38
38
39
39
private final File file ;
40
40
41
- public Backend backend = BackendManager .defaultBackend ();
41
+ // Don't actually default to off, we'll find the true default in #load
42
+ public Backend backend = BackendManager .offBackend ();
42
43
public boolean limitUpdates = LIMIT_UPDATES_DEFAULT ;
43
44
public int workerThreads = WORKER_THREADS_DEFAULT ;
44
45
@@ -69,6 +70,10 @@ public BackendConfig backendConfig() {
69
70
}
70
71
71
72
public void load () {
73
+ // Grab the default backend here because this object is constructed
74
+ // very early in flywheel loading and not all backends may be registered
75
+ backend = BackendManager .defaultBackend ();
76
+
72
77
if (file .exists ()) {
73
78
try (FileReader reader = new FileReader (file )) {
74
79
fromJson (JsonParser .parseReader (reader ));
You can’t perform that action at this time.
0 commit comments