All Known Implementing Classes:
LoaderUtilImpl

public interface LoaderUtil
  • Field Details

  • Method Details

    • getMinecraftVersion

      static String getMinecraftVersion()
    • getLoaderName

      static @Nullable String getLoaderName()
      Provides the current mod loader's name/branding.

      When running on client, it's fine to call this whenever.
      When running on server, calling this before the SERVER_STARTING event has been invoked will return an empty string.

      Returns:
      the current mod loader's name/branding or an empty string when called on a dedicated server before it has started starting.
    • getConfigDir

      static Path getConfigDir()
    • getModsDir

      static Path getModsDir()
    • getGameDir

      static Path getGameDir()
    • isDevelopmentEnvironment

      static boolean isDevelopmentEnvironment()
    • isDedicatedServer

      static boolean isDedicatedServer()
    • sendMessagesToAdminsOnJoin

      static void sendMessagesToAdminsOnJoin(Supplier<MonkeyLibText[]> messageSupplier)
      Sends the messages supplied by the provided supplier to admins when they join.
      Also sends the message(s) on singleplayer start
      Parameters:
      messageSupplier - called to get the messages to send
    • getMinecraftVersionImpl

      @Internal String getMinecraftVersionImpl()
    • getConfigDirImpl

      @Internal Path getConfigDirImpl()
    • getModsDirImpl

      @Internal Path getModsDirImpl()
    • getGameDirImpl

      @Internal Path getGameDirImpl()
    • isDevelopmentEnvironmentImpl

      @Internal boolean isDevelopmentEnvironmentImpl()
    • isDedicatedServerImpl

      @Internal boolean isDedicatedServerImpl()
    • sendMessagesToAdminsOnJoinImpl

      @Internal void sendMessagesToAdminsOnJoinImpl(Supplier<MonkeyLibText[]> messageSupplier)