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 floatalphaprivate floatblueprivate floatbrightnessMultiplierprivate floatgreenprivate intlightprivate Matrix4fmatrixprivate List<GlyphRenderer.Rectangle>rectanglesprivate floatredprivate booleanseeThroughprivate booleanshadow(package private) VertexConsumerProvidervertexConsumersprivate floatxprivate floaty -
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 booleanaccept(int index, Style style, int codePoint)Visits a single character.private voidaddRectangle(GlyphRenderer.Rectangle rectangle)floatdrawLayer(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 final 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
codePointwhen passed into this method.- Specified by:
acceptin 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:
trueto continue visiting other characters, orfalseto terminate the visit
-
drawLayer
public float drawLayer(int underlineColor, float x)
-