public final class RockBottomAPI
extends java.lang.Object
IApiHandler. See Registries for a list
of all of the registries in the game. See GameContent for a list of
all the content in the game.| Modifier and Type | Field | Description |
|---|---|---|
static java.lang.String |
VERSION |
The current API version equal to the version in the build.gradle file.
|
| Constructor | Description |
|---|---|
RockBottomAPI() |
| Modifier and Type | Method | Description |
|---|---|---|
static java.util.logging.Logger |
createLogger(java.lang.String name) |
Convenience call to
IApiHandler.createLogger(String) that creates
a Logger with a specified name. |
static IApiHandler |
getApiHandler() |
Returns the
IApiHandler object initialized by the game on
startup. |
static IContentPackLoader |
getContentPackLoader() |
Returns the
IContentPackLoader object initialized by the game on
startup. |
static IEventHandler |
getEventHandler() |
Returns the
IEventHandler object initialized by the game on
startup. |
static IGameInstance |
getGame() |
Returns the
IGameInstance object initialized as the game on
startup. |
static IInternalHooks |
getInternalHooks() |
Returns the
IInternalHooks object initialized by the game on
startup. |
static IModLoader |
getModLoader() |
Returns the
IModLoader object initialized by the game on startup. |
static INetHandler |
getNet() |
Returns the
INetHandler object initialized by the game on
startup. |
static IResourceRegistry |
getResourceRegistry() |
Returns the
IResourceRegistry object initialized by the game on
startup. |
static java.util.logging.Logger |
logger() |
Convenience call to
IInternalHooks.logger() that returns the
game's internal logger |
static void |
setInternals(Internals intern) |
This is an internal method that sets all of the important game-related
constants like the
IGameInstance or IApiHandler. |
public static final java.lang.String VERSION
public static IApiHandler getApiHandler()
IApiHandler object initialized by the game on
startup. The API handler contains a set of useful helper methods that can
be used to do various things.public static INetHandler getNet()
INetHandler object initialized by the game on
startup. The net handler contains a set of methods to deal with
multiplayer and networking.public static IEventHandler getEventHandler()
IEventHandler object initialized by the game on
startup. The event handler contains a set of methods to deal with
subscribing, firing and listening to events.public static IGameInstance getGame()
IGameInstance object initialized as the game on
startup. This is also an instance of the IMod that the game
represents. The game instance contains references to the player, the
asset manager, the graphics context and various other things.public static IModLoader getModLoader()
IModLoader object initialized by the game on startup.
The mod loader contains a set of methods to deal with mod interaction and
loading and finding mods.public static IContentPackLoader getContentPackLoader()
IContentPackLoader object initialized by the game on
startup. The content pack loader contains a set of methods to deal with
content pack interaction and loading, finding and organizing content
packs.public static IResourceRegistry getResourceRegistry()
IResourceRegistry object initialized by the game on
startup. The resource registry can be used to register resources to be
used in construction and various other recipes. The idea of it is that it
unifies items to be represented by just a name, so that if, for example,
multiple mods add an item representing copper ore, then it can be
registered into the resource registry by both mods as "oreCopper" so that
recipes can use copper universally.public static IInternalHooks getInternalHooks()
IInternalHooks object initialized by the game on
startup. This is an api internal interface used to access methods outside
of the API. None of the api internal hooks should be used by mods.public static java.util.logging.Logger createLogger(java.lang.String name)
IApiHandler.createLogger(String) that creates
a Logger with a specified name.name - The logger's display name@ApiInternal public static java.util.logging.Logger logger()
IInternalHooks.logger() that returns the
game's internal logger@ApiInternal public static void setInternals(Internals intern)
IGameInstance or IApiHandler. Do not
call this method as it will throw an IllegalStateException at all
circumstancesintern - The internals