Package net.minecraftforge.fml
Class ModLoadingContext
- java.lang.Object
-
- net.minecraftforge.fml.ModLoadingContext
-
public class ModLoadingContext extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description private ModContainer
activeContainer
private static java.lang.ThreadLocal<ModLoadingContext>
context
private java.lang.Object
languageExtension
private ModLoadingStage
stage
-
Constructor Summary
Constructors Constructor Description ModLoadingContext()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> T
extension()
static ModLoadingContext
get()
ModContainer
getActiveContainer()
java.lang.String
getActiveNamespace()
void
registerConfig(ModConfig.Type type, ForgeConfigSpec spec)
void
registerConfig(ModConfig.Type type, ForgeConfigSpec spec, java.lang.String fileName)
<T> void
registerExtensionPoint(ExtensionPoint<T> point, java.util.function.Supplier<T> extension)
Register anExtensionPoint
with the mod container.void
setActiveContainer(ModContainer container, java.lang.Object languageExtension)
-
-
-
Field Detail
-
context
private static java.lang.ThreadLocal<ModLoadingContext> context
-
languageExtension
private java.lang.Object languageExtension
-
stage
private ModLoadingStage stage
-
activeContainer
private ModContainer activeContainer
-
-
Method Detail
-
get
public static ModLoadingContext get()
-
setActiveContainer
public void setActiveContainer(ModContainer container, java.lang.Object languageExtension)
-
getActiveContainer
public ModContainer getActiveContainer()
-
getActiveNamespace
public java.lang.String getActiveNamespace()
-
registerExtensionPoint
public <T> void registerExtensionPoint(ExtensionPoint<T> point, java.util.function.Supplier<T> extension)
Register anExtensionPoint
with the mod container.- Type Parameters:
T
- The type signature of the extension operator- Parameters:
point
- The extension point to registerextension
- An extension operator
-
registerConfig
public void registerConfig(ModConfig.Type type, ForgeConfigSpec spec)
-
registerConfig
public void registerConfig(ModConfig.Type type, ForgeConfigSpec spec, java.lang.String fileName)
-
extension
public <T> T extension()
-
-