Interface LynxAddon


public interface LynxAddon
Entry point of a LynxClient addon. Declare the class in the addon's fabric.mod.json:
"entrypoints": { "lynx": ["com.example.MyAddon"] },
"custom": { "lynx": { "api": 1 } }
LynxClient calls onLoad(LynxApi) once at start, after its own modules and after the addons this one depends on. Register modules and HUD widgets there; everything else (settings page, saving, HUD editor, translations from assets/<addon id>/lang/de_de.json) is done by LynxClient.

Addons use only this API – no Minecraft classes – so one jar runs on every Minecraft version LynxClient supports.

  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Register modules (lynx.modules().register(...)) and event listeners here
    default void
    When the game closes – save own files here if needed (module settings are saved by LynxClient)
  • Method Details

    • onLoad

      void onLoad(LynxApi lynx)
      Register modules (lynx.modules().register(...)) and event listeners here
    • onShutdown

      default void onShutdown()
      When the game closes – save own files here if needed (module settings are saved by LynxClient)