Interface PreLaunchEntrypoint

Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface
public interface PreLaunchEntrypoint
Entrypoint getting invoked just before launching the game.

Avoid interfering with the game from this! Accessing anything needs careful consideration to avoid interfering with its own initialization or otherwise harming its state. It is recommended to implement this interface on its own class to avoid running static initializers too early, e.g. because they were referenced in field or method signatures in the same class.

The entrypoint is exposed with preLaunch key in the mod json and runs for any environment. It usually executes several seconds before the main/client/server entrypoints.

See Also:
FabricLoader.getEntrypointContainers(String, Class)
  • Method Summary

    Modifier and Type Method Description
    void onPreLaunch()
    Runs the entrypoint.
  • Method Details

    • onPreLaunch

      void onPreLaunch()
      Runs the entrypoint.