Package net.neoforged.fml.javafmlmod
Class FMLModContainer
java.lang.Object
net.neoforged.fml.ModContainer
net.neoforged.fml.javafmlmod.FMLModContainer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final net.neoforged.bus.api.IEventBus
private final Module
private static final org.apache.logging.log4j.Marker
private static final org.apache.logging.log4j.Logger
private final ModFileScanData
Fields inherited from class net.neoforged.fml.ModContainer
extensionPoints, modId, modInfo, namespace
-
Constructor Summary
ConstructorsConstructorDescriptionFMLModContainer
(IModInfo info, List<String> entrypoints, ModFileScanData modFileScanResults, ModuleLayer gameLayer) -
Method Summary
Modifier and TypeMethodDescriptionprotected void
Function invoked by FML to construct the mod, right before the dispatch ofFMLConstructModEvent
.net.neoforged.bus.api.IEventBus
Returns the event bus for this mod, if available.private void
onEventFailed
(net.neoforged.bus.api.IEventBus iEventBus, net.neoforged.bus.api.Event event, net.neoforged.bus.api.EventListener[] iEventListeners, int i, Throwable throwable) Methods inherited from class net.neoforged.fml.ModContainer
acceptEvent, acceptEvent, getCustomExtension, getModId, getModInfo, getNamespace, registerConfig, registerConfig, registerExtensionPoint, registerExtensionPoint
-
Field Details
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
LOADING
private static final org.apache.logging.log4j.Marker LOADING -
scanResults
-
eventBus
private final net.neoforged.bus.api.IEventBus eventBus -
modClasses
-
layer
-
-
Constructor Details
-
FMLModContainer
public FMLModContainer(IModInfo info, List<String> entrypoints, ModFileScanData modFileScanResults, ModuleLayer gameLayer)
-
-
Method Details
-
onEventFailed
private void onEventFailed(net.neoforged.bus.api.IEventBus iEventBus, net.neoforged.bus.api.Event event, net.neoforged.bus.api.EventListener[] iEventListeners, int i, Throwable throwable) -
constructMod
protected void constructMod()Description copied from class:ModContainer
Function invoked by FML to construct the mod, right before the dispatch ofFMLConstructModEvent
.- Overrides:
constructMod
in classModContainer
-
getEventBus
public net.neoforged.bus.api.IEventBus getEventBus()Description copied from class:ModContainer
Returns the event bus for this mod, if available.Not all mods have an event bus!
- Specified by:
getEventBus
in classModContainer
- Returns:
- the event bus for this mod, if available
-