public interface IMod
| Modifier and Type | Method and Description |
|---|---|
default java.lang.String |
getDescription() |
java.lang.String |
getDisplayName() |
java.lang.String |
getId() |
default java.lang.Class<? extends Gui> |
getModGuiClass()
|
java.lang.String |
getResourceLocation()
Returns the location in the jar file that mod-related
IAssets
are stored (images, sounds, language files etc.)
The location must contain a file named "assets.info" containg a mapping of all the asset names to their locations in the jar file For instance, RockBottom uses the resource location "/assets/rockbottom", meaning the "assets.info" file has to be at "/assets/rockbottom/assets.info". |
default int |
getSortingPriority()
Returns the priority with which this mod will be sorted in the list of mods
Higher values mean that it will be closer to the start of the list RockBottom has a priority of Integer.MAX_VALUE to always be loaded first |
java.lang.String |
getVersion() |
default void |
init(IGameInstance game,
IAssetManager assetManager,
IApiHandler apiHandler,
IEventHandler eventHandler)
Override this method to do any actions that should happen during the initialization of the base game
|
default boolean |
isDisableable() |
default void |
postInit(IGameInstance game,
IAssetManager assetManager,
IApiHandler apiHandler,
IEventHandler eventHandler)
Override this method to do any actions that should happen after the initialization of the base game
|
default void |
preInit(IGameInstance game,
IApiHandler apiHandler,
IEventHandler eventHandler)
Override this method to do any actions that should happen before the initialization of the base game
|
java.lang.String getDisplayName()
java.lang.String getId()
java.lang.String getVersion()
java.lang.String getResourceLocation()
IAssets
are stored (images, sounds, language files etc.)
default java.lang.String getDescription()
Gui
on the title screendefault int getSortingPriority()
Integer.MAX_VALUE to always be loaded firstdefault java.lang.Class<? extends Gui> getModGuiClass()
Gui that is opened from a button that is
displayed in the mods menu on the title screen of the game automatically
Gui parentdefault boolean isDisableable()
default void preInit(IGameInstance game, IApiHandler apiHandler, IEventHandler eventHandler)
game - The current game instanceapiHandler - The API handlereventHandler - The event handlerdefault void init(IGameInstance game, IAssetManager assetManager, IApiHandler apiHandler, IEventHandler eventHandler)
game - The current game instanceassetManager - The asset managerapiHandler - The API handlereventHandler - The event handlerdefault void postInit(IGameInstance game, IAssetManager assetManager, IApiHandler apiHandler, IEventHandler eventHandler)
game - The current game instanceassetManager - The asset managerapiHandler - The API handlereventHandler - The event handler