public class ModLoadingContext
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
private ModContainer |
activeContainer |
private static java.lang.ThreadLocal<ModLoadingContext> |
context |
private java.lang.Object |
languageExtension |
Constructor and Description |
---|
ModLoadingContext() |
Modifier and Type | Method and 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 an
ExtensionPoint with the mod container. |
void |
setActiveContainer(ModContainer container,
java.lang.Object languageExtension) |
private static java.lang.ThreadLocal<ModLoadingContext> context
private java.lang.Object languageExtension
private ModContainer activeContainer
public static ModLoadingContext get()
public void setActiveContainer(ModContainer container, java.lang.Object languageExtension)
public ModContainer getActiveContainer()
public java.lang.String getActiveNamespace()
public <T> void registerExtensionPoint(ExtensionPoint<T> point, java.util.function.Supplier<T> extension)
ExtensionPoint
with the mod container.T
- The type signature of the extension operatorpoint
- The extension point to registerextension
- An extension operatorpublic void registerConfig(ModConfig.Type type, ForgeConfigSpec spec)
public void registerConfig(ModConfig.Type type, ForgeConfigSpec spec, java.lang.String fileName)
public <T> T extension()