Package net.darkhax.bookshelf.impl.util
Class PlatformHelperFabric
java.lang.Object
net.darkhax.bookshelf.impl.util.PlatformHelperFabric
- All Implemented Interfaces:
IPlatformHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGets the specified configuration path for the game.Gets the working directory path of the game directory.Gets a set of loaded mod IDs.@Nullable StringgetModName(String modId) Attempts to resolve the name of a mod using the associated mod ID.Gets the primary path that the current loader will load mods from.@Nullable StringgetModVersion(String modId) getName()Gets the name of the platform.Gets the physical environment that the code is running on.booleanChecks if the mod is running in a development environment.booleanisModLoaded(String modId) Checks if a given mod is loaded.booleanChecks if the mod is currently running in an environment with game tests enabled.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.darkhax.bookshelf.api.util.IPlatformHelper
getConfigDirectory, getGameDirectory, getModNameComponent, getModsDirectory, isPhysicalClient
-
Constructor Details
-
PlatformHelperFabric
public PlatformHelperFabric()
-
-
Method Details
-
getGamePath
Description copied from interface:IPlatformHelperGets the working directory path of the game directory.- Specified by:
getGamePathin interfaceIPlatformHelper- Returns:
- The working directory path of the game directory.
-
getConfigPath
Description copied from interface:IPlatformHelperGets the specified configuration path for the game.- Specified by:
getConfigPathin interfaceIPlatformHelper- Returns:
- The specified configuration path for the game.
-
getModsPath
Description copied from interface:IPlatformHelperGets the primary path that the current loader will load mods from.- Specified by:
getModsPathin interfaceIPlatformHelper- Returns:
- The currently specified mods path.
-
getLoadedMods
Description copied from interface:IPlatformHelperGets a set of loaded mod IDs.- Specified by:
getLoadedModsin interfaceIPlatformHelper- Returns:
- A set of loaded mod IDs.
-
isModLoaded
Description copied from interface:IPlatformHelperChecks if a given mod is loaded.- Specified by:
isModLoadedin interfaceIPlatformHelper- Parameters:
modId- The mod id to search for.- Returns:
- True when the specified mod id has been loaded.
-
isDevelopmentEnvironment
public boolean isDevelopmentEnvironment()Description copied from interface:IPlatformHelperChecks if the mod is running in a development environment.- Specified by:
isDevelopmentEnvironmentin interfaceIPlatformHelper- Returns:
- True when the mod is running in a developer environment.
-
getPhysicalSide
Description copied from interface:IPlatformHelperGets the physical environment that the code is running on.- Specified by:
getPhysicalSidein interfaceIPlatformHelper- Returns:
- The physical environment that the code is running on.
-
getModName
Description copied from interface:IPlatformHelperAttempts to resolve the name of a mod using the associated mod ID. If no mod is not available the provided ID will be treated as the name.- Specified by:
getModNamein interfaceIPlatformHelper- Parameters:
modId- The ID of the mod to lookup.- Returns:
- The name of the mod associated with the given mod ID. If no mod is not available the provided ID will be treated as the name.
-
getModVersion
- Specified by:
getModVersionin interfaceIPlatformHelper
-
isTestingEnvironment
public boolean isTestingEnvironment()Description copied from interface:IPlatformHelperChecks if the mod is currently running in an environment with game tests enabled.- Specified by:
isTestingEnvironmentin interfaceIPlatformHelper- Returns:
- Are game tests currently enabled?
-
getName
Description copied from interface:IPlatformHelperGets the name of the platform.- Specified by:
getNamein interfaceIPlatformHelper- Returns:
- The name of the platform.
-