Class RenderLibHud

java.lang.Object
com.render.api.RenderLibHud

public final class RenderLibHud extends Object
Entry point for HUD rendering callbacks.
  • 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

      public static RenderRegistration register(HudRenderer renderer)
      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

      public static RenderRegistration register(ManagedHudLayout layout)
    • unregister

      public static void unregister(String modId)
    • openPlacementScreen

      public static void openPlacementScreen(String modId)
    • openPlacementScreen

      public static void openPlacementScreen(net.minecraft.resources.Identifier modId)
    • showToast

      public static ToastHandle showToast(ToastComponent toast)
      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.