Interface Strategy

All Known Implementing Classes:
BillboardStrategy, HudStrategy, ScreenStrategy, WorldStrategy

public interface Strategy
Common abstraction for every floating-text render strategy (world billboard, fixed-depth screen billboard, and 2D HUD overlay). FloatingTextRenderer drives the shared fade/scale/stagger pipeline and delegates only the two pieces that actually vary between strategies: per-text visibility and glyph emission.
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Interface
    Description
    static final record 
    Resolved per-glyph placement produced by the shared driver.
  • Method Summary

    Modifier and Type
    Method
    Description
    net.minecraft.world.phys.Vec3
    Camera position used by the shared driver for distance-based fade and scaling.
    boolean
    Per-text visibility test.
    void
    draw(FloatingText text, int charIndex, boolean perChar, Strategy.GlyphPlacement placement)
    Emit a single glyph (the whole text, or one staggered character).
  • Method Details

    • camPos

      net.minecraft.world.phys.Vec3 camPos()
      Camera position used by the shared driver for distance-based fade and scaling.
    • cull

      boolean cull(FloatingText text)
      Per-text visibility test. Implementations may stash strategy-specific data (e.g. projected screen coordinates) as a side effect.
      Returns:
      true to skip this text
    • draw

      void draw(FloatingText text, int charIndex, boolean perChar, Strategy.GlyphPlacement placement)
      Emit a single glyph (the whole text, or one staggered character).