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:
@@ -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);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user