Package net.minecraft.client.font
Class TextRenderer.ShadowDrawer
java.lang.Object
net.minecraft.client.font.TextRenderer.ShadowDrawer
- All Implemented Interfaces:
TextVisitFactory.CharacterVisitor
- Enclosing class:
- TextRenderer
@Environment(CLIENT) class TextRenderer.ShadowDrawer extends Object implements TextVisitFactory.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 ShadowDrawer(VertexConsumerProvider vertexConsumers, float x, float y, int color, boolean shadow, Matrix4f matrix, boolean seeThrough, int light) -
Method Summary
Modifier and Type Method Description private voidaddRectangle(GlyphRenderer.Rectangle rectangle)floatdrawLayer(int underlineColor, float x)booleanonChar(int index, Style style, int codePoint)Visits a single character.
-
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
-
ShadowDrawer
public ShadowDrawer(VertexConsumerProvider vertexConsumers, float x, float y, int color, boolean shadow, Matrix4f matrix, boolean seeThrough, int light)
-
-
Method Details
-
addRectangle
-
onChar
Visits a single character.Multiple surrogate characters are converted into one single
codePointwhen passed into this method.- Specified by:
onCharin interfaceTextVisitFactory.CharacterVisitor- 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)
-