public class Loader
extends java.lang.Object
There are several LoaderState
s to mod loading, triggered in two
different stages from the FML handler code's hooks into the minecraft code.
modClassLoader
Scanning, the loaded
containers for mod classes to load and registering them appropriately.Modifier and Type | Field and Description |
---|---|
static java.lang.String |
MC_VERSION |
Modifier and Type | Method and Description |
---|---|
ModContainer |
activeModContainer() |
void |
computeDependencies(java.lang.String dependencyString,
java.util.Set<ArtifactVersion> requirements,
java.util.List<ArtifactVersion> dependencies,
java.util.List<ArtifactVersion> dependants)
Deprecated.
|
void |
fireRemapEvent(java.util.Map<ResourceLocation,java.util.Map<ResourceLocation,java.lang.Integer[]>> remaps,
boolean isFreezing) |
java.util.List<ModContainer> |
getActiveModList() |
ICrashCallable |
getCallableCrashInformation() |
java.io.File |
getConfigDir() |
java.lang.String |
getCrashInformation() |
java.util.Map<java.lang.String,java.lang.String> |
getCustomModProperties(java.lang.String modId) |
java.util.Map<java.lang.String,java.lang.String> |
getFMLBrandingProperties() |
java.lang.String |
getFMLVersionString() |
java.util.Map<java.lang.String,ModContainer> |
getIndexedModList() |
LoaderState |
getLoaderState() |
java.lang.String |
getMCPVersionString() |
java.lang.String |
getMCVersionString() |
MinecraftDummyContainer |
getMinecraftModContainer() |
ModClassLoader |
getModClassLoader() |
java.util.List<ModContainer> |
getModList() |
com.google.common.collect.BiMap<ModContainer,java.lang.Object> |
getModObjectList() |
LoaderState.ModState |
getModState(ModContainer selectedMod) |
com.google.common.collect.BiMap<java.lang.Object,ModContainer> |
getReversedModObjectList() |
boolean |
hasReachedState(LoaderState state) |
void |
initializeMods() |
static void |
injectData(java.lang.Object... data) |
static Loader |
instance() |
boolean |
isInState(LoaderState state) |
static boolean |
isModLoaded(java.lang.String modname)
Query if we know of a mod named modname
|
void |
loadingComplete() |
void |
loadMods(java.util.List<java.lang.String> injectedModContainers)
Called from the hook to start mod loading.
|
void |
preinitializeMods() |
void |
runtimeDisableMod(java.lang.String modId) |
boolean |
serverAboutToStart(java.lang.Object server) |
void |
serverStarted() |
boolean |
serverStarting(java.lang.Object server) |
void |
serverStopped() |
void |
serverStopping() |
void |
setActiveModContainer(ModContainer container) |
void |
setupTestHarness(ModContainer... containers)
Used to setup a testharness with a single dummy mod instance for use with various testing hooks
|
public static final java.lang.String MC_VERSION
public static Loader instance()
public static void injectData(java.lang.Object... data)
public java.util.List<ModContainer> getModList()
public void setupTestHarness(ModContainer... containers)
containers
- A list of dummy containers that will be returned as "active" for all queriespublic void loadMods(java.util.List<java.lang.String> injectedModContainers)
#identifyMods()
and Constructing, Preinitalization, and Initalization phases here. Finally,
the mod list is frozen completely and is consider immutable from then on.injectedModContainers
- containers to injectpublic void preinitializeMods()
public static boolean isModLoaded(java.lang.String modname)
modname
- public java.io.File getConfigDir()
public java.lang.String getCrashInformation()
public java.lang.String getFMLVersionString()
public ModClassLoader getModClassLoader()
@Deprecated public void computeDependencies(java.lang.String dependencyString, java.util.Set<ArtifactVersion> requirements, java.util.List<ArtifactVersion> dependencies, java.util.List<ArtifactVersion> dependants)
DependencyParser.parseDependencies(String)
public java.util.Map<java.lang.String,ModContainer> getIndexedModList()
public void initializeMods()
public ICrashCallable getCallableCrashInformation()
public java.util.List<ModContainer> getActiveModList()
public LoaderState.ModState getModState(ModContainer selectedMod)
public java.lang.String getMCVersionString()
public boolean serverStarting(java.lang.Object server)
public void serverStarted()
public void serverStopping()
public com.google.common.collect.BiMap<ModContainer,java.lang.Object> getModObjectList()
public com.google.common.collect.BiMap<java.lang.Object,ModContainer> getReversedModObjectList()
@Nullable public ModContainer activeModContainer()
public boolean isInState(LoaderState state)
public MinecraftDummyContainer getMinecraftModContainer()
public boolean hasReachedState(LoaderState state)
public java.lang.String getMCPVersionString()
public void serverStopped()
public boolean serverAboutToStart(java.lang.Object server)
public java.util.Map<java.lang.String,java.lang.String> getFMLBrandingProperties()
public java.util.Map<java.lang.String,java.lang.String> getCustomModProperties(java.lang.String modId)
public void fireRemapEvent(java.util.Map<ResourceLocation,java.util.Map<ResourceLocation,java.lang.Integer[]>> remaps, boolean isFreezing)
public void runtimeDisableMod(java.lang.String modId)
public void loadingComplete()
public final LoaderState getLoaderState()
public void setActiveModContainer(@Nullable ModContainer container)