Class TextRenderer.Drawer

java.lang.Object
net.minecraft.client.font.TextRenderer.Drawer
All Implemented Interfaces:
CharacterVisitor
Enclosing class:
TextRenderer

@Environment(CLIENT)
class TextRenderer.Drawer
extends Object
implements CharacterVisitor
  • Field Details

    • vertexConsumers

      final VertexConsumerProvider vertexConsumers
    • shadow

      private final boolean shadow
    • brightnessMultiplier

      private final float brightnessMultiplier
    • red

      private final float red
    • green

      private final float green
    • blue

      private final float blue
    • alpha

      private final float alpha
    • matrix

      private final Matrix4f matrix
    • seeThrough

      private final boolean seeThrough
    • light

      private final int light
    • x

      private float x
    • y

      private float y
    • rectangles

      @Nullable private List<GlyphRenderer.Rectangle> rectangles
  • Constructor Details

    • Drawer

      public Drawer​(VertexConsumerProvider vertexConsumers, float x, float y, int color, boolean shadow, Matrix4f matrix, boolean seeThrough, int light)
  • Method Details

    • addRectangle

      private void addRectangle​(GlyphRenderer.Rectangle rectangle)
    • accept

      public boolean accept​(int index, Style style, int codePoint)
      Visits a single character.

      Multiple surrogate characters are converted into one single codePoint when passed into this method.

      Specified by:
      accept in interface CharacterVisitor
      Parameters:
      index - the current index of the character
      style - the style of the character, containing formatting and font information
      codePoint - the code point of the character
      Returns:
      true to continue visiting other characters, or false to terminate the visit
    • drawLayer

      public float drawLayer​(int underlineColor, float x)