Class HudStrategy

java.lang.Object
cromveil.combatnumbers.client.render.HudStrategy
All Implemented Interfaces:
Strategy

public final class HudStrategy extends Object implements Strategy
Renders floating text on the HUD. The one that works against all edge cases I know of so far.
  • Constructor Details

    • HudStrategy

      public HudStrategy(net.minecraft.client.gui.GuiGraphicsExtractor graphics, net.minecraft.client.renderer.state.level.CameraRenderState cam)
  • Method Details

    • camPos

      public net.minecraft.world.phys.Vec3 camPos()
      Description copied from interface: Strategy
      Camera position used by the shared driver for distance-based fade and scaling.
      Specified by:
      camPos in interface Strategy
    • cull

      public boolean cull(FloatingText text)
      Description copied from interface: Strategy
      Per-text visibility test. Implementations may stash strategy-specific data (e.g. projected screen coordinates) as a side effect.
      Specified by:
      cull in interface Strategy
      Returns:
      true to skip this text
    • draw

      public void draw(FloatingText text, int charIndex, boolean perChar, Strategy.GlyphPlacement placement)
      Description copied from interface: Strategy
      Emit a single glyph (the whole text, or one staggered character).
      Specified by:
      draw in interface Strategy