1
0
mirror of https://github.com/SquidDev-CC/CC-Tweaked synced 2025-11-07 17:03:00 +00:00

Eagerly create upgrade registries for Fabric

Instead of creating the upgrade serialiser registries in mod
initialisation, we now do it when the API is created. This ensures the
registries are available for other mods, irrespective of mod load order.

This feels a little sad (we're doing side effects in the static
initialiser), but is /fine/ - it's pretty much what other mods do.
This commit is contained in:
Jonathan Coates
2023-06-03 19:01:07 +01:00
parent 4d064d1552
commit f0abb83f6e
14 changed files with 76 additions and 21 deletions

View File

@@ -6,7 +6,6 @@ package dan200.computercraft.impl.network.wired;
import com.google.common.collect.Maps;
import com.google.common.collect.Sets;
import dan200.computercraft.api.ComputerCraftAPI;
import dan200.computercraft.api.network.wired.WiredElement;
import dan200.computercraft.api.network.wired.WiredNetwork;
import dan200.computercraft.api.network.wired.WiredNetworkChange;
@@ -308,7 +307,7 @@ public class NetworkTest {
this.world = world;
this.position = position;
this.id = id;
this.node = ComputerCraftAPI.createWiredNodeForElement(this);
this.node = new WiredNodeImpl(this);
this.addPeripheral(id);
}