Class BossBarClient
java.lang.Object
net.ixdarklord.coolcatcanvas.internal.client.bossbar.BossBarClient
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 TypeMethodDescriptionstatic booleancustom(net.minecraft.world.BossEvent event) Whether a bar is drawn by a renderer of its style (rather than as the game draws it).static intdraw(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 voidinit()static voidonStyle(BossBarStylePayload payload) static voidregister(net.minecraft.resources.Identifier style, BossBarRenderer renderer) static voidOnce a tick, from the overlay: bars ease and trails drain; bars no longer up are forgotten.
-
Method Details
-
init
public static void init() -
register
-
onStyle
-
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
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.
-