Interface PlatformHelper

All Known Implementing Classes:
FabricPlatformHelper

public interface PlatformHelper
  • Method Details

    • getLoader

      Gets the current loader
      Returns:
      The current loader.
    • getEnv

      Gets the side that the mod currently being run on.
      Returns:
      The side the mod is running on, which will be PlatformHelper.Env.CLIENT or PlatformHelper.Env.SERVER.
    • isModLoaded

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

      List<String> getLoadedMods()
    • executeOnClientOnly

      void executeOnClientOnly(Supplier<Runnable> toRun)
    • executeOnServerOnly

      void executeOnServerOnly(Supplier<Runnable> toRun)