mirror of
https://github.com/MinecraftForge/MinecraftForge.git
synced 2026-11-16 10:34:49 +00:00
Move Registry Events to the mod event bus.
Add infrastructure to allow parallel or synchronous dispatch of mod events, and pass-through of events to the dispatch system. Signed-off-by: cpw <[email protected]>
This commit is contained in:
9 files changed
+162
-88
No files matched your search
@@ -123,10 +123,10 @@ public class ModLoader
|
||||
}
|
||||
modList.setLoadedMods(modContainerStream.collect(Collectors.toList()));
|
||||
dispatchAndHandleError(LifecycleEventProvider.CONSTRUCT);
|
||||
GameData.fireCreateRegistryEvents();
|
||||
GameData.fireCreateRegistryEvents(LifecycleEventProvider.CREATE_REGISTRIES, this::dispatchAndHandleError);
|
||||
ObjectHolderRegistry.findObjectHolders();
|
||||
CapabilityManager.INSTANCE.injectCapabilities(modList.getAllScanData());
|
||||
GameData.fireRegistryEvents();
|
||||
GameData.fireRegistryEvents(rl->true, LifecycleEventProvider.LOAD_REGISTRIES, this::dispatchAndHandleError);
|
||||
dispatchAndHandleError(LifecycleEventProvider.SETUP);
|
||||
DistExecutor.runWhenOn(Dist.CLIENT, ModLoader::fireClientEvents);
|
||||
dispatchAndHandleError(LifecycleEventProvider.SIDED_SETUP);
|
||||
|
||||
Reference in new issue
Block a user