To access the current platform (loader), you may use Platform
class.
Returns whether the current loader is Fabric, or any Fabric-like derivatives, such as Quilt.
Returns whether the current loader is Forge.
Returns the current Minecraft version.
Returns the path to the game's .minecraft
folder.
Returns the path to the loader defined config folder, this is usually in .minecraft/config
.
Returns the path to the loader defined mods folder, this is usually in .minecraft/mods
.
Returns the current distribution the game is running on, either CLIENT
or SERVER
.
The class returned is a platform-agnostic wrapper around the Fabric's EnvType
and Forge's Dist
enums.
Note: Only use this if you have Architectury Injectables, which is on by default.
Returns the current distribution the game is running on, either CLIENT
or SERVER
.
The class returned is remapped to be the platform's type, either Fabric's EnvType
and Forge's Dist
enums.
Returns whether a mod with the modid id
is loaded.
Returns a wrapper for a mod with the modid id
. Throws NoSuchElementException
if the mod is not found.
Returns an optional wrapper for a mod with the modid id
, if found.
Returns the list of all mods loaded.
Returns the list of all modids.
Returns whether the current running Minecraft is ran from development.