Interface PlatformHelper
- All Known Implementing Classes:
NeoForgePlatformHelper
public interface PlatformHelper
-
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 loadergetModDisplayName(String modId) booleanCheck if the game is currently in a development environment.booleanisModLoaded(String modId) Checks if a mod with the given id is loaded.
-
Method Details
-
getLoader
Loader getLoader()Gets the current loader- Returns:
- The current loader.
-
getEnv
Env getEnv()Gets the side that the mod currently being run on.- Returns:
- The side the mod is running on, which will be
Env.CLIENTorEnv.SERVER.
-
isModLoaded
Checks if a mod with the given id is loaded.- Parameters:
modId- The mod to check if it is loaded.- Returns:
- True if the mod is loaded, false otherwise.
-
isDevelopmentEnvironment
boolean isDevelopmentEnvironment()Check if the game is currently in a development environment.- Returns:
- True if in a development environment, false otherwise.
-
getLoadedMods
-
getModDisplayName
-
executeOnClientOnly
-
executeOnServerOnly
-