Package net.createmod.catnip.platform
Class FabricPlatformHelper
java.lang.Object
net.createmod.catnip.platform.FabricPlatformHelper
- All Implemented Interfaces:
PlatformHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteOnClientOnly(Supplier<Runnable> toRun) voidexecuteOnServerOnly(Supplier<Runnable> toRun) Gets the name of the current platformbooleanCheck if the game is currently in a development environment.booleanisModLoaded(String modId) Checks if a mod with the given id is loaded.
-
Constructor Details
-
FabricPlatformHelper
public FabricPlatformHelper()
-
-
Method Details
-
getPlatformName
Description copied from interface:PlatformHelperGets the name of the current platform- Specified by:
getPlatformNamein interfacePlatformHelper- Returns:
- The name of the current platform.
-
isModLoaded
Description copied from interface:PlatformHelperChecks if a mod with the given id is loaded.- Specified by:
isModLoadedin interfacePlatformHelper- Parameters:
modId- The mod to check if it is loaded.- Returns:
- True if the mod is loaded, false otherwise.
-
isDevelopmentEnvironment
public boolean isDevelopmentEnvironment()Description copied from interface:PlatformHelperCheck if the game is currently in a development environment.- Specified by:
isDevelopmentEnvironmentin interfacePlatformHelper- Returns:
- True if in a development environment, false otherwise.
-
getLoadedMods
- Specified by:
getLoadedModsin interfacePlatformHelper
-
executeOnClientOnly
- Specified by:
executeOnClientOnlyin interfacePlatformHelper
-
executeOnServerOnly
- Specified by:
executeOnServerOnlyin interfacePlatformHelper
-