Interface PlatformHelper

All Known Implementing Classes:
FabricPlatformHelper

public interface PlatformHelper
Defines the contract for retrieving platform-specific runtime environment data.
  • Method Summary

    Modifier and Type
    Method
    Description
    default String
    Gets the environment name as a string for logging purposes.
    Gets the name of the current mod loader.
    boolean
    Checks if the game is running in a development environment (IDE).
    boolean
    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

      boolean isModLoaded(String modId)
      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

      default String getEnvironmentName()
      Gets the environment name as a string for logging purposes.
      Returns:
      "development" or "production".