|
Quilt Loader 1
|
Classes | |
| class | InitHelper |
| Provides singleton for static init assignment regardless of load order. | |
Public Member Functions | |
| ObjectShare | getObjectShare () |
| Get the object share for inter-mod communication. | |
| MappingResolver | getMappingResolver () |
| Get the current mapping resolver. | |
| Optional< ModContainer > | getModContainer (String id) |
| Gets the container for a given mod. | |
| Optional< ModContainer > | quilt_getModContainer (Class<?> clazz) |
Provided to make it easier to call QuiltLoader#getModContainer(Class) via reflection for fabric-only mods. | |
| Collection< ModContainer > | getAllMods () |
| Gets all mod containers. | |
| boolean | isModLoaded (String id) |
| Checks if a mod with a given ID is loaded. | |
| boolean | isDevelopmentEnvironment () |
| Checks if Fabric Loader is currently running in a "development" environment. | |
| EnvType | getEnvironmentType () |
| Get the current environment type. | |
| Object | getGameInstance () |
| Get the current game instance. | |
| Path | getGameDir () |
| Get the current game working directory. | |
| File | getGameDirectory () |
| Path | getConfigDir () |
| Get the current directory for game configuration files. | |
| String | getRawGameVersion () |
| Get the original unprocessed game version. | |
| File | getConfigDirectory () |
| String[] | getLaunchArguments (boolean sanitize) |
| Gets the command line arguments used to launch the game. | |
| Public Member Functions inherited from net.fabricmc.loader.FabricLoader | |
| File | getModsDirectory () |
| Collection< ModContainer > | getModContainers () |
| List< ModContainer > | getMods () |
| void | prepareModInit (File runDir, Object gameInstance) |
Static Public Attributes | |
| static final FabricLoaderImpl | INSTANCE = new FabricLoaderImpl() |
| Static Public Attributes inherited from net.fabricmc.loader.FabricLoader | |
| static final FabricLoader | INSTANCE = FabricLoaderImpl.InitHelper.get() |
Additional Inherited Members | |
| Static Public Member Functions inherited from net.fabricmc.loader.api.FabricLoader | |
| static FabricLoader | getInstance () |
| Returns the public-facing Fabric Loader instance. | |
|
inline |
Gets all mod containers.
Implements net.fabricmc.loader.api.FabricLoader.
|
inline |
Get the current directory for game configuration files.
Implements net.fabricmc.loader.api.FabricLoader.
|
inline |
Implements net.fabricmc.loader.api.FabricLoader.
|
inline |
Get the current environment type.
Implements net.fabricmc.loader.api.FabricLoader.
|
inline |
Get the current game working directory.
Implements net.fabricmc.loader.api.FabricLoader.
|
inline |
Implements net.fabricmc.loader.api.FabricLoader.
|
inline |
Get the current game instance.
Can represent a game client or server object. As such, the exact return is dependent on the current environment type.
The game instance may not always be available depending on the game version and environment.
Implements net.fabricmc.loader.api.FabricLoader.
|
inline |
Gets the command line arguments used to launch the game.
The implementation will try to strip or obscure sensitive data like authentication tokens if sanitize is set to true. Callers are highly encouraged to enable sanitization as compromising the information can easily happen with logging, exceptions, serialization or other causes.
There is no guarantee that sanitize covers everything, so the launch arguments should still not be logged or otherwise exposed routinely even if the parameter is set to true. In particular it won't necessarily strip all information that can be used to identify the user.
| sanitize | Whether to try to remove or obscure sensitive information |
Implements net.fabricmc.loader.api.FabricLoader.
|
inline |
Get the current mapping resolver.
When performing reflection, a mod should always query the mapping resolver for the remapped names of members than relying on other heuristics.
Implements net.fabricmc.loader.api.FabricLoader.
|
inline |
Gets the container for a given mod.
| id | the ID of the mod |
Implements net.fabricmc.loader.api.FabricLoader.
|
inline |
Get the object share for inter-mod communication.
The share allows mods to exchange data without directly referencing each other. This makes simple interaction easier by eliminating any compile- or run-time dependencies if the shared value type is independent of the mod (only Java/game/Fabric types like collections, primitives, String, Consumer, Function, ...).
Active interaction is possible as well since the shared values can be arbitrary Java objects. For example exposing a Runnable or Function allows the "API" user to directly invoke some program logic.
It is required to prefix the share key with the mod id like mymod:someProperty. Mods should not modify entries by other mods. The share is thread safe.
Implements net.fabricmc.loader.api.FabricLoader.
|
inline |
Get the original unprocessed game version.
There is normally a Semver-compatible derived game version, obtainable from a mod container representing the game, that is derived from this raw version. The raw version may not comparable or even follow a well defined pattern, making it unusable for dependency range evaluation.
Implements net.fabricmc.loader.api.FabricLoader.
|
inline |
Checks if Fabric Loader is currently running in a "development" environment.
Can be used for enabling debug mode or additional checks.
This should not be used to make assumptions on certain features, such as mappings, but as a toggle for certain functionalities.
Implements net.fabricmc.loader.api.FabricLoader.
|
inline |
Checks if a mod with a given ID is loaded.
| id | the ID of the mod, as defined in fabric.mod.json |
Implements net.fabricmc.loader.api.FabricLoader.
|
inline |
Provided to make it easier to call QuiltLoader#getModContainer(Class) via reflection for fabric-only mods.
Implements net.fabricmc.loader.api.FabricLoader.