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 ClassesModifier and TypeInterfaceDescriptionstatic final recordResolved per-glyph placement produced by the shared driver. -
Method Summary
Modifier and TypeMethodDescriptionnet.minecraft.world.phys.Vec3camPos()Camera position used by the shared driver for distance-based fade and scaling.booleancull(FloatingText text) Per-text visibility test.voiddraw(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
Per-text visibility test. Implementations may stash strategy-specific data (e.g. projected screen coordinates) as a side effect.- Returns:
trueto skip this text
-
draw
Emit a single glyph (the whole text, or one staggered character).
-