类 FMLModContainer
java.lang.Object
net.minecraftforge.fml.ModContainer
net.minecraftforge.fml.javafmlmod.FMLModContainer
-
字段概要
字段修饰符和类型字段说明private final FMLJavaModLoadingContext
private final net.minecraftforge.eventbus.api.IEventBus
private static Method
private static final org.apache.logging.log4j.Marker
private static final org.apache.logging.log4j.Logger
private final Class
<?> private Object
private final net.minecraftforge.forgespi.language.ModFileScanData
从类继承的字段 net.minecraftforge.fml.ModContainer
activityMap, configHandler, configs, contextExtension, extensionPoints, modId, modInfo, modLoadingStage, namespace
-
构造器概要
构造器构造器说明FMLModContainer
(net.minecraftforge.forgespi.language.IModInfo info, String className, net.minecraftforge.forgespi.language.ModFileScanData modFileScanResults, ModuleLayer gameLayer) -
方法概要
修饰符和类型方法说明protected <T extends net.minecraftforge.eventbus.api.Event & IModBusEvent>
voidacceptEvent
(T e) Accept an arbitrary event for processing by the mod.private static void
addOpenOrExport
(Module target, String pkg, Module reader, boolean open) private static void
addOpenOrExports
(ModuleLayer layer, Module self, boolean open, Attributes attrs) private void
void
dispatchConfigEvent
(IConfigEvent event) net.minecraftforge.eventbus.api.IEventBus
getMod()
boolean
Does this mod match the supplied mod?private static void
onEventFailed
(net.minecraftforge.eventbus.api.IEventBus iEventBus, net.minecraftforge.eventbus.api.Event event, net.minecraftforge.eventbus.api.IEventListener[] iEventListeners, int i, Throwable throwable) private static void
openModules
(ModuleLayer layer, Module self, cpw.mods.jarhandling.SecureJar jar) Reads the Add-Exports and Add-Opens attributes (see note) from a mod file and attempts to apply them.toString()
从类继承的方法 net.minecraftforge.fml.ModContainer
addConfig, getCurrentState, getCustomExtension, getModId, getModInfo, getNamespace, registerDisplayTest, registerDisplayTest, registerDisplayTest, registerDisplayTest, registerExtensionPoint
-
字段详细资料
-
LOGGER
private static final org.apache.logging.log4j.Logger LOGGER -
LOADING
private static final org.apache.logging.log4j.Marker LOADING -
scanResults
private final net.minecraftforge.forgespi.language.ModFileScanData scanResults -
eventBus
private final net.minecraftforge.eventbus.api.IEventBus eventBus -
modInstance
-
modClass
-
context
-
implAddExportsOrOpens
-
-
构造器详细资料
-
FMLModContainer
public FMLModContainer(net.minecraftforge.forgespi.language.IModInfo info, String className, net.minecraftforge.forgespi.language.ModFileScanData modFileScanResults, ModuleLayer gameLayer)
-
-
方法详细资料
-
openModules
private static void openModules(ModuleLayer layer, Module self, cpw.mods.jarhandling.SecureJar jar) throws NoSuchMethodException, SecurityException, IllegalAccessException, InvocationTargetException Reads the Add-Exports and Add-Opens attributes (see note) from a mod file and attempts to apply them. This differers from the JEP in two significant ways: 1) Instead of opening things to ALL-UNNAMED it instead only opens to the mod's module itself. Because I don't want other mods accidently relying on transitive behavior 2) It is read from all mods not just the executable jars. From JEP 261: Module System Two new JDK-specific JAR-file manifest attributes are defined to correspond to the --add-exports and --add-opens command-line options: Add-Exports: <module>/<package>( <module>/<package>)* Add-Opens: <module>/<package>( <module>/<package>)* The value of each attribute is a space-separated list of slash-separated module-name/package-name pairs. A >module</>package< pair in the value of an Add-Exports attribute has the same meaning as the command-line option --add-exports >module</>package<=ALL-UNNAMED. A >module</>package< pair in the value of an Add-Opens attribute has the same meaning as the command-line option --add-opens >module</>package<=ALL-UNNAMED. Each attribute can occur at most once, in the main section of a MANIFEST.MF file. A particular pair can be listed more than once. If a specified module was not resolved, or if a specified package does not exist, then the corresponding pair is ignored.
-
addOpenOrExports
private static void addOpenOrExports(ModuleLayer layer, Module self, boolean open, Attributes attrs) throws NoSuchMethodException, SecurityException, IllegalAccessException, InvocationTargetException -
addOpenOrExport
private static void addOpenOrExport(Module target, String pkg, Module reader, boolean open) throws NoSuchMethodException, SecurityException, IllegalAccessException, InvocationTargetException -
onEventFailed
private static void onEventFailed(net.minecraftforge.eventbus.api.IEventBus iEventBus, net.minecraftforge.eventbus.api.Event event, net.minecraftforge.eventbus.api.IEventListener[] iEventListeners, int i, Throwable throwable) -
constructMod
private void constructMod() -
matches
从类复制的说明:ModContainer
Does this mod match the supplied mod?- 指定者:
matches
在类中ModContainer
- 参数:
mod
- to compare- 返回:
- if the mod matches
-
getMod
- 指定者:
getMod
在类中ModContainer
- 返回:
- the mod object instance
-
getEventBus
public net.minecraftforge.eventbus.api.IEventBus getEventBus() -
acceptEvent
从类复制的说明:ModContainer
Accept an arbitrary event for processing by the mod. Probably posted to an event bus in the lower level container.- 覆盖:
acceptEvent
在类中ModContainer
- 参数:
e
- Event to accept
-
dispatchConfigEvent
- 覆盖:
dispatchConfigEvent
在类中ModContainer
-
toString
-