Class RenderLibHud
java.lang.Object
com.render.api.RenderLibHud
Entry point for HUD rendering callbacks.
-
Method Summary
Modifier and TypeMethodDescriptionstatic voidInstalls the HUD render hook used by the library.static voidClears all queued and visible HUD toasts.static voidopenPlacementScreen(String modId) static voidopenPlacementScreen(net.minecraft.resources.Identifier modId) static RenderRegistrationregister(HudRenderer renderer) Registers a HUD renderer that is invoked every frame.static RenderRegistrationregister(ManagedHudLayout layout) static ToastHandleshowToast(ToastComponent toast) Shows a managed HUD toast.static voidunregister(String modId)
-
Method Details
-
bootstrap
public static void bootstrap()Installs the HUD render hook used by the library.Call this once during client initialization before registering HUD renderers.
-
register
Registers a HUD renderer that is invoked every frame.- Parameters:
renderer- callback that draws into the HUD canvas- Returns:
- a handle that unregisters the renderer when closed
-
register
-
unregister
-
openPlacementScreen
-
openPlacementScreen
public static void openPlacementScreen(net.minecraft.resources.Identifier modId) -
showToast
Shows a managed HUD toast. The library owns stacking, expiry, and cleanup.- Parameters:
toast- toast to display- Returns:
- handle used to dismiss or inspect the toast
-
clearToasts
public static void clearToasts()Clears all queued and visible HUD toasts.
-