Interface PlatformHelper
- All Known Implementing Classes:
FabricPlatformHelper
public interface PlatformHelper
Defines the contract for retrieving platform-specific runtime environment data.
-
Method Summary
Modifier and TypeMethodDescriptiondefault StringGets the environment name as a string for logging purposes.Gets the name of the current mod loader.booleanChecks if the game is running in a development environment (IDE).booleanisModLoaded(String modId) Checks if another mod with the given ID is currently loaded.
-
Method Details
-
getPlatformName
String getPlatformName()Gets the name of the current mod loader.- Returns:
- "Fabric" or "NeoForge".
-
isModLoaded
Checks if another mod with the given ID is currently loaded.- Parameters:
modId- The mod ID to check.- Returns:
- True if the mod is loaded, false otherwise.
-
isDevelopmentEnvironment
boolean isDevelopmentEnvironment()Checks if the game is running in a development environment (IDE).- Returns:
- True if in development, false if in production.
-
getEnvironmentName
Gets the environment name as a string for logging purposes.- Returns:
- "development" or "production".
-