public class FMLPreInitializationEvent extends FMLStateEvent
FMLInitializationEvent
during mod startup.
This is the first of three commonly called events during mod initialization.
Recommended activities:
Setup your logging getModLog()
Load any configuration data you might have getSuggestedConfigurationFile()
Search for a version.properties file and load it getVersionProperties()
Configure your ModMetadata
programmatically getModMetadata()
Register your blocks and items with the GameRegistry
Discover parts of your mod by using annotation search getAsmData()
for how to subscribe to this event
Constructor and Description |
---|
FMLPreInitializationEvent(java.lang.Object... data) |
Modifier and Type | Method and Description |
---|---|
void |
applyModContainer(ModContainer activeContainer) |
ASMDataTable |
getAsmData()
Get the
ASMDataTable for this instance of Minecraft. |
java.security.cert.Certificate[] |
getFMLSigningCertificates()
Deprecated.
|
java.io.File |
getModConfigurationDirectory()
Get the main configuration directory for this minecraft instance
|
org.apache.logging.log4j.Logger |
getModLog()
Get a logger instance configured to write to the FML Log as a parent, identified by modid.
|
ModMetadata |
getModMetadata()
Get the
ModMetadata for this mod |
LoaderState.ModState |
getModState()
The current state of the mod
|
java.io.File |
getSourceFile()
Get the
File the mod was loaded from |
java.io.File |
getSuggestedConfigurationFile()
Get a suggested configuration file for this mod.
|
java.util.Properties |
getVersionProperties()
Get a version.properties file as a
Properties object from the mod file. |
getSide
description, getEventType
public FMLPreInitializationEvent(java.lang.Object... data)
public LoaderState.ModState getModState()
FMLStateEvent
getModState
in class FMLStateEvent
public void applyModContainer(ModContainer activeContainer)
applyModContainer
in class FMLEvent
public java.io.File getSourceFile()
File
the mod was loaded frompublic ModMetadata getModMetadata()
ModMetadata
for this modpublic java.io.File getModConfigurationDirectory()
public java.io.File getSuggestedConfigurationFile()
public ASMDataTable getAsmData()
ASMDataTable
for this instance of Minecraft. This is a special structure containing
parsing information from FML. It can be searched for annotations parsed out by FML.@Nullable public java.util.Properties getVersionProperties()
Properties
object from the mod file.
This can be used to load build-type information
such as a unique version number from a properties file shipped as part of the distributable.public org.apache.logging.log4j.Logger getModLog()
config/logging.properties
file, specifying logging levels
for your ModID. Use this!@Deprecated public java.security.cert.Certificate[] getFMLSigningCertificates()