Add in the objectholder, autopopulated by FML based on simple rules. Allows

for reference driven substitution of mod blocks and items based on their
server running state.
This commit is contained in:
Christian committed 2014-05-24 22:32:24 -04:00
1 parent 31d726abad
commit 725d988e36
5 files changed
+255

No files matched your search

@@ -62,6 +62,7 @@ import cpw.mods.fml.common.functions.ArtifactVersionNameFunction;
import cpw.mods.fml.common.functions.ModIdFunction;
import cpw.mods.fml.common.registry.GameData;
import cpw.mods.fml.common.registry.GameRegistry.Type;
import cpw.mods.fml.common.registry.ObjectHolderRegistry;
import cpw.mods.fml.common.toposort.ModSorter;
import cpw.mods.fml.common.toposort.ModSortingException;
import cpw.mods.fml.common.toposort.ModSortingException.SortingExceptionData;
@@ -502,12 +503,14 @@ public class Loader
public void preinitializeMods()
{
ObjectHolderRegistry.INSTANCE.findObjectHolders(discoverer.getASMTable());
if (!modController.isInState(LoaderState.PREINITIALIZATION))
{
FMLLog.warning("There were errors previously. Not beginning mod initialization phase");
return;
}
modController.distributeStateMessage(LoaderState.PREINITIALIZATION, discoverer.getASMTable(), canonicalConfigDir);
ObjectHolderRegistry.INSTANCE.applyObjectHolders();
modController.transition(LoaderState.INITIALIZATION, false);
}