@Environment(value=CLIENT) public class TextRenderer extends Object
| Modifier and Type | Class and Description |
|---|---|
(package private) class |
TextRenderer.ShadowDrawer |
| Modifier and Type | Field and Description |
|---|---|
int |
fontHeight |
private Function<Identifier,FontStorage> |
fontStorageAccessor |
private static Vector3f |
FORWARD_SHIFT |
private TextHandler |
handler |
Random |
random |
| Constructor and Description |
|---|
TextRenderer(Function<Identifier,FontStorage> fontStorageAccessor) |
| Modifier and Type | Method and Description |
|---|---|
int |
draw(class_5348 class_5348,
float x,
float y,
int color,
boolean shadow,
Matrix4f matrix,
VertexConsumerProvider vertexConsumers,
boolean seeThrough,
int backgroundColor,
int light) |
private int |
draw(class_5348 class_5348,
float x,
float y,
int color,
Matrix4f matrix,
boolean shadow) |
int |
draw(MatrixStack matrices,
class_5348 class_5348,
float x,
float y,
int color) |
int |
draw(MatrixStack matrices,
String text,
float x,
float y,
int color) |
int |
draw(String text,
float x,
float y,
int color,
boolean shadow,
Matrix4f matrix,
VertexConsumerProvider vertexConsumers,
boolean seeThrough,
int backgroundColor,
int light) |
int |
draw(String text,
float x,
float y,
int color,
boolean shadow,
Matrix4f matrix,
VertexConsumerProvider vertexConsumers,
boolean seeThrough,
int backgroundColor,
int light,
boolean rightToLeft) |
private int |
draw(String text,
float x,
float y,
int color,
Matrix4f matrix,
boolean shadow,
boolean mirror) |
private void |
drawGlyph(GlyphRenderer glyphRenderer,
boolean bold,
boolean italic,
float weight,
float x,
float y,
Matrix4f matrix,
VertexConsumer vertexConsumer,
float red,
float green,
float blue,
float alpha,
int light) |
private int |
drawInternal(class_5348 class_5348,
float x,
float y,
int color,
boolean shadow,
Matrix4f matrix,
VertexConsumerProvider vertexConsumerProvider,
boolean seeThrough,
int backgroundColor,
int light) |
private int |
drawInternal(String text,
float x,
float y,
int color,
boolean shadow,
Matrix4f matrix,
VertexConsumerProvider vertexConsumers,
boolean seeThrough,
int backgroundColor,
int light,
boolean mirror) |
private float |
drawLayer(class_5348 class_5348,
float x,
float y,
int color,
boolean shadow,
Matrix4f matrix,
VertexConsumerProvider vertexConsumerProvider,
boolean seeThrough,
int underlineColor,
int light) |
private float |
drawLayer(String text,
float x,
float y,
int color,
boolean shadow,
Matrix4f matrix,
VertexConsumerProvider vertexConsumerProvider,
boolean seeThrough,
int underlineColor,
int light) |
void |
drawTrimmed(class_5348 class_5348,
int x,
int y,
int maxWidth,
int color) |
int |
drawWithShadow(MatrixStack matrices,
class_5348 class_5348,
float x,
float y,
int color) |
int |
drawWithShadow(MatrixStack matrices,
String text,
float x,
float y,
int color) |
private FontStorage |
getFontStorage(Identifier id) |
int |
getStringBoundedHeight(String text,
int maxWidth) |
TextHandler |
getTextHandler() |
int |
getWidth(class_5348 class_5348) |
int |
getWidth(String text) |
boolean |
isRightToLeft() |
int |
method_29342(MatrixStack matrixStack,
String string,
float float2,
float float3,
int int2,
boolean bool) |
String |
mirror(String text) |
class_5348 |
trimToWidth(class_5348 class_5348,
int width) |
String |
trimToWidth(String text,
int maxWidth) |
String |
trimToWidth(String text,
int maxWidth,
boolean backwards) |
private static int |
tweakTransparency(int argb) |
List<class_5348> |
wrapLines(class_5348 class_5348,
int width) |
private static final Vector3f FORWARD_SHIFT
public final int fontHeight
public final Random random
private final Function<Identifier,FontStorage> fontStorageAccessor
private final TextHandler handler
public TextRenderer(Function<Identifier,FontStorage> fontStorageAccessor)
private FontStorage getFontStorage(Identifier id)
public int drawWithShadow(MatrixStack matrices, String text, float x, float y, int color)
public int method_29342(MatrixStack matrixStack, String string, float float2, float float3, int int2, boolean bool)
public int draw(MatrixStack matrices, String text, float x, float y, int color)
public int drawWithShadow(MatrixStack matrices, class_5348 class_5348, float x, float y, int color)
public int draw(MatrixStack matrices, class_5348 class_5348, float x, float y, int color)
private int draw(String text, float x, float y, int color, Matrix4f matrix, boolean shadow, boolean mirror)
private int draw(class_5348 class_5348, float x, float y, int color, Matrix4f matrix, boolean shadow)
public int draw(String text, float x, float y, int color, boolean shadow, Matrix4f matrix, VertexConsumerProvider vertexConsumers, boolean seeThrough, int backgroundColor, int light)
public int draw(String text, float x, float y, int color, boolean shadow, Matrix4f matrix, VertexConsumerProvider vertexConsumers, boolean seeThrough, int backgroundColor, int light, boolean rightToLeft)
public int draw(class_5348 class_5348, float x, float y, int color, boolean shadow, Matrix4f matrix, VertexConsumerProvider vertexConsumers, boolean seeThrough, int backgroundColor, int light)
private static int tweakTransparency(int argb)
private int drawInternal(String text, float x, float y, int color, boolean shadow, Matrix4f matrix, VertexConsumerProvider vertexConsumers, boolean seeThrough, int backgroundColor, int light, boolean mirror)
private int drawInternal(class_5348 class_5348, float x, float y, int color, boolean shadow, Matrix4f matrix, VertexConsumerProvider vertexConsumerProvider, boolean seeThrough, int backgroundColor, int light)
private float drawLayer(String text, float x, float y, int color, boolean shadow, Matrix4f matrix, VertexConsumerProvider vertexConsumerProvider, boolean seeThrough, int underlineColor, int light)
private float drawLayer(class_5348 class_5348, float x, float y, int color, boolean shadow, Matrix4f matrix, VertexConsumerProvider vertexConsumerProvider, boolean seeThrough, int underlineColor, int light)
private void drawGlyph(GlyphRenderer glyphRenderer, boolean bold, boolean italic, float weight, float x, float y, Matrix4f matrix, VertexConsumer vertexConsumer, float red, float green, float blue, float alpha, int light)
public int getWidth(String text)
public int getWidth(class_5348 class_5348)
public class_5348 trimToWidth(class_5348 class_5348, int width)
public void drawTrimmed(class_5348 class_5348, int x, int y, int maxWidth, int color)
public int getStringBoundedHeight(String text, int maxWidth)
public List<class_5348> wrapLines(class_5348 class_5348, int width)
public boolean isRightToLeft()
public TextHandler getTextHandler()