Class BossBarClient

java.lang.Object
net.ixdarklord.coolcatcanvas.internal.client.bossbar.BossBarClient

public final class BossBarClient extends Object
Custom boss bars on the client: which style each bar is in (from the server's BossBarStylePayload), the renderers registered for each style, and what each bar needs from one frame to the next to be drawn well: its eased progress, its trail, how fresh its last hit is. BossHealthOverlayMixin asks it to draw.
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    custom(net.minecraft.world.BossEvent event)
    Whether a bar is drawn by a renderer of its style (rather than as the game draws it).
    static int
    draw(net.minecraft.client.gui.GuiGraphicsExtractor graphics, net.minecraft.world.BossEvent event, int y)
    Draws a custom bar with its top at y; returns how much height it took.
    static void
     
    static void
     
    static void
    register(net.minecraft.resources.Identifier style, BossBarRenderer renderer)
     
    static void
    tick(Iterable<? extends net.minecraft.world.BossEvent> events)
    Once a tick, from the overlay: bars ease and trails drain; bars no longer up are forgotten.

    Methods inherited from class Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • init

      public static void init()
    • register

      public static void register(net.minecraft.resources.Identifier style, BossBarRenderer renderer)
    • onStyle

      public static void onStyle(BossBarStylePayload payload)
    • custom

      public static boolean custom(net.minecraft.world.BossEvent event)
      Whether a bar is drawn by a renderer of its style (rather than as the game draws it).
    • tick

      public static void tick(Iterable<? extends net.minecraft.world.BossEvent> events)
      Once a tick, from the overlay: bars ease and trails drain; bars no longer up are forgotten.
    • draw

      public static int draw(net.minecraft.client.gui.GuiGraphicsExtractor graphics, net.minecraft.world.BossEvent event, int y)
      Draws a custom bar with its top at y; returns how much height it took.