Package net.minecraft.client.font
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 Summary
Fields Modifier and Type Field Description private float
alpha
private float
blue
private float
brightnessMultiplier
private float
green
private int
light
private Matrix4f
matrix
private List<GlyphRenderer.Rectangle>
rectangles
private float
red
private boolean
seeThrough
private boolean
shadow
(package private) VertexConsumerProvider
vertexConsumers
private float
x
private float
y
-
Constructor Summary
Constructors Constructor Description Drawer(VertexConsumerProvider vertexConsumers, float x, float y, int color, boolean shadow, Matrix4f matrix, boolean seeThrough, int light)
-
Method Summary
Modifier and Type Method Description boolean
accept(int index, Style style, int codePoint)
Visits a single character.private void
addRectangle(GlyphRenderer.Rectangle rectangle)
float
drawLayer(int underlineColor, float x)
-
Field Details
-
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
-
seeThrough
private final boolean seeThrough -
light
private final int light -
x
private float x -
y
private float y -
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
-
accept
Visits a single character.Multiple surrogate characters are converted into one single
codePoint
when passed into this method.- Specified by:
accept
in interfaceCharacterVisitor
- Parameters:
index
- the current index of the characterstyle
- the style of the character, containing formatting and font informationcodePoint
- the code point of the character- Returns:
true
to continue visiting other characters, orfalse
to terminate the visit
-
drawLayer
public float drawLayer(int underlineColor, float x)
-