Add "send to mods in order" method to ModList and use it (#8759)

* Add "send to mods in order" method to ModList and use it in RegistryEvents and DataGen..
* Also preserve order in runAll
* Do better comparator thanks @pupnewfster
* postEvent as well.
This commit is contained in:
cpw authored and GitHub committed 2022-06-20 16:11:33 -04:00
1 parent ca90babc4a
commit 7bb97dafda
5 files changed
+22 -9

No files matched your search

@@ -153,7 +153,7 @@ public class RegistryManager
NewRegistryEvent event = new NewRegistryEvent();
vanillaRegistryKeys = Set.copyOf(Registry.REGISTRY.keySet());
ModLoader.get().postEventWithWrap(event, (mc, e) -> ModLoadingContext.get().setActiveContainer(mc), (mc, e) -> ModLoadingContext.get().setActiveContainer(null));
ModLoader.get().postEventWithWrapInModOrder(event, (mc, e) -> ModLoadingContext.get().setActiveContainer(mc), (mc, e) -> ModLoadingContext.get().setActiveContainer(null));
event.fill();
}