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 TypeMethodDescriptionvoidRegister modules (lynx.modules().register(...)) and event listeners heredefault voidWhen the game closes – save own files here if needed (module settings are saved by LynxClient)
-
Method Details
-
onLoad
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)
-