Interface PlatformHelper
- All Known Implementing Classes:
FabricPlatformHelper
public interface PlatformHelper
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumstatic enum -
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.
-
Method Details
-
getLoader
PlatformHelper.Loader getLoader()Gets the current loader- Returns:
- The current loader.
-
getEnv
PlatformHelper.Env getEnv()Gets the side that the mod currently being run on.- Returns:
- The side the mod is running on, which will be
PlatformHelper.Env.CLIENTorPlatformHelper.Env.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
-
executeOnClientOnly
-
executeOnServerOnly
-