Package net.createmod.catnip.platform
Class NeoForgePlatformHelper
java.lang.Object
net.createmod.catnip.platform.NeoForgePlatformHelper
- All Implemented Interfaces:
PlatformHelper
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidexecuteOnClientOnly(Supplier<Runnable> toRun) voidexecuteOnServerOnly(Supplier<Runnable> toRun) getEnv()Gets the side that the mod currently being run on.Gets the current loaderbooleanCheck if the game is currently in a development environment.booleanisModLoaded(String modId) Checks if a mod with the given id is loaded.
-
Constructor Details
-
NeoForgePlatformHelper
public NeoForgePlatformHelper()
-
-
Method Details
-
getLoader
Description copied from interface:PlatformHelperGets the current loader- Specified by:
getLoaderin interfacePlatformHelper- Returns:
- The current loader.
-
getEnv
Description copied from interface:PlatformHelperGets the side that the mod currently being run on.- Specified by:
getEnvin interfacePlatformHelper- Returns:
- The side the mod is running on, which will be
Env.CLIENTorEnv.SERVER.
-
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
-