Class NeoForgePlatformHelper
java.lang.Object
net.darkhax.bookshelf.neoforge.impl.util.NeoForgePlatformHelper
- 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 every loaded modId.Gets the primary path that the current loader will load mods from.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.<T extends net.minecraft.world.inventory.AbstractContainerMenu>
voidunsafeRegisterMenu(net.minecraft.resources.ResourceLocation id, MenuRegister.ClientMenuFactory<T> clientFactory) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.darkhax.bookshelf.common.api.util.IPlatformHelper
getConfigDirectory, getGameDirectory, getModsDirectory, isPhysicalClient
-
Constructor Details
-
NeoForgePlatformHelper
public NeoForgePlatformHelper()
-
-
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.
-
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.
-
getLoadedMods
Description copied from interface:IPlatformHelperGets a set of every loaded modId.- Specified by:
getLoadedModsin interfaceIPlatformHelper- Returns:
-
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.
-
unsafeRegisterMenu
public <T extends net.minecraft.world.inventory.AbstractContainerMenu> void unsafeRegisterMenu(net.minecraft.resources.ResourceLocation id, MenuRegister.ClientMenuFactory<T> clientFactory) - Specified by:
unsafeRegisterMenuin interfaceIPlatformHelper
-