Package net.minecraftforge.fml
Class ModLoadingContext
java.lang.Object
net.minecraftforge.fml.ModLoadingContext
-
Field Summary
Modifier and TypeFieldDescriptionprivate ModContainer
private static final ThreadLocal
<ModLoadingContext> private Object
private static final org.slf4j.Logger
private ModLoadingStage
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescription<T> T
static ModLoadingContext
get()
void
registerConfig
(ModConfig.Type type, IConfigSpec<?> spec) void
registerConfig
(ModConfig.Type type, IConfigSpec<?> spec, String fileName) void
registerDisplayTest
(String version, BiPredicate<String, Boolean> remoteVersionTest) Register aIExtensionPoint.DisplayTest
with the mod container.void
registerDisplayTest
(Supplier<String> suppliedVersion, BiPredicate<String, Boolean> remoteVersionTest) Register aIExtensionPoint.DisplayTest
with the mod container.void
registerDisplayTest
(Supplier<IExtensionPoint.DisplayTest> displayTest) Register aIExtensionPoint.DisplayTest
with the mod container.void
registerDisplayTest
(IExtensionPoint.DisplayTest displayTest) Register aIExtensionPoint.DisplayTest
with the mod container.<T extends Record & IExtensionPoint<T>>
voidregisterExtensionPoint
(Class<? extends IExtensionPoint<T>> point, Supplier<T> extension) Register anIExtensionPoint
with the mod container.void
setActiveContainer
(ModContainer container)
-
Field Details
-
LOGGER
private static final org.slf4j.Logger LOGGER -
context
-
languageExtension
-
stage
-
activeContainer
-
-
Constructor Details
-
ModLoadingContext
public ModLoadingContext()
-
-
Method Details
-
get
-
setActiveContainer
-
getActiveContainer
-
getActiveNamespace
-
registerExtensionPoint
public <T extends Record & IExtensionPoint<T>> void registerExtensionPoint(Class<? extends IExtensionPoint<T>> point, Supplier<T> extension) Register anIExtensionPoint
with the mod container.- Type Parameters:
T
- The type signature of the extension operator- Parameters:
point
- The extension point to registerextension
- An extension operator
-
registerDisplayTest
Register aIExtensionPoint.DisplayTest
with the mod container.A shorthand for registering a DisplayTest with
registerExtensionPoint(Class, Supplier)
.- Parameters:
displayTest
- TheIExtensionPoint.DisplayTest
to register
-
registerDisplayTest
Register aIExtensionPoint.DisplayTest
with the mod container.A shorthand for registering a DisplayTest supplier with
registerExtensionPoint(Class, Supplier)
.- Parameters:
displayTest
- TheSupplier<IExtensionPoint.DisplayTest>
to register
-
registerDisplayTest
Register aIExtensionPoint.DisplayTest
with the mod container.A shorthand for registering a DisplayTest with
registerExtensionPoint(Class, Supplier)
that also creates the DisplayTest instance for you using the provided parameters.- See Also:
-
registerDisplayTest
public void registerDisplayTest(Supplier<String> suppliedVersion, BiPredicate<String, Boolean> remoteVersionTest) Register aIExtensionPoint.DisplayTest
with the mod container.A shorthand for registering a DisplayTest with
registerExtensionPoint(Class, Supplier)
that also creates the DisplayTest instance for you using the provided parameters.- See Also:
-
registerConfig
-
registerConfig
-
extension
public <T> T extension()
-