@Environment(value=CLIENT) public final class FontRendererAPIImpl extends java.lang.Object implements FontRendererAPI
FontRendererAPI.Font| Constructor and Description |
|---|
FontRendererAPIImpl() |
| Modifier and Type | Method and Description |
|---|---|
net.minecraft.client.render.VertexConsumer |
chooseVertexConsumer(FontRendererAPI.Font font,
net.minecraft.client.render.VertexConsumerProvider vcp)
Query an appropriate
VertexConsumer for a given font type. |
void |
drawString(FontRendererAPI.Font font,
net.minecraft.client.util.math.MatrixStack.Entry matrices,
net.minecraft.client.render.VertexConsumer vc,
int light,
int overlay,
int color,
java.lang.CharSequence value,
int maxChars)
Render up to the specified amount of characters of the specified string.
|
void |
drawString(java.lang.String string)
Render the specified string.
|
void |
drawString(java.lang.String string,
int maxChars)
Render up to the specified amount of characters of the specified string.
|
int |
getCharHeight()
Get the height of the characters drawn with the font renderer, in pixels.
|
int |
getCharWidth()
Get the width of the characters drawn with the font renderer, in pixels.
|
public void drawString(java.lang.String string)
FontRendererAPIdrawString in interface FontRendererAPIstring - the string to render.public void drawString(java.lang.String string,
int maxChars)
FontRendererAPIThis is intended as a convenience method for clamped-width rendering, avoiding additional string operations such as substring.
drawString in interface FontRendererAPIstring - the string to render.maxChars - the maximum number of characters to render.public void drawString(FontRendererAPI.Font font, net.minecraft.client.util.math.MatrixStack.Entry matrices, net.minecraft.client.render.VertexConsumer vc, int light, int overlay, int color, java.lang.CharSequence value, int maxChars)
FontRendererAPIdrawString in interface FontRendererAPIfont - the font type.matrices - the current transformation.vc - the VertexConsumer queried via chooseVertexConsumer.light - the light value, usually RenderUtil.maxLight.overlay - the overlay value, passed from vanilla.color - the text color, in 0xAARRGGBB.value - the string to render.maxChars - the maximum number of characters to render.public net.minecraft.client.render.VertexConsumer chooseVertexConsumer(FontRendererAPI.Font font, net.minecraft.client.render.VertexConsumerProvider vcp)
FontRendererAPIVertexConsumer for a given font type.chooseVertexConsumer in interface FontRendererAPIfont - the font type.vcp - the VertexConsumerProvider for this frame.public int getCharWidth()
FontRendererAPIgetCharWidth in interface FontRendererAPIpublic int getCharHeight()
FontRendererAPIgetCharHeight in interface FontRendererAPI