Interface IFontRenderer
- All Superinterfaces:
IRenderer
,IScissorable
Interface for font rendering
TODO: documentation
-
Method Summary
Modifier and TypeMethodDescriptiondouble
drawString
(com.mojang.blaze3d.vertex.PoseStack matrixStack, String text, double x, double y, int color, boolean shadow) Draws a string at the specified coordinatesdouble
drawString
(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.util.FormattedCharSequence text, double x, double y, int color, boolean shadow) Draws a string at the specified coordinatesdefault double
drawString
(String text, double x, double y, int color) default double
drawString
(String text, double x, double y, int color, boolean shadow) default double
drawString
(net.minecraft.network.chat.FormattedText text, double x, double y, int color) default double
drawString
(net.minecraft.network.chat.FormattedText text, double x, double y, int color, boolean shadow) default double
drawString
(net.minecraft.util.FormattedCharSequence text, double x, double y, int color) default double
drawString
(net.minecraft.util.FormattedCharSequence text, double x, double y, int color, boolean shadow) double
drawText
(com.mojang.blaze3d.vertex.PoseStack matrixStack, String text, double x, double y, int color, boolean shadow, double maxWidth, double spacing) double
drawText
(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.network.chat.FormattedText text, double x, double y, int color, boolean shadow, double maxWidth, double spacing) default double
drawText
(String text, double x, double y, int color, boolean shadow, double maxWidth, double spacing) default double
default double
drawText
(net.minecraft.network.chat.FormattedText text, double x, double y, int color, boolean shadow, double maxWidth, double spacing) default double
drawText
(net.minecraft.network.chat.FormattedText text, double x, double y, int color, double maxWidth, double spacing) boolean
If the shadow parameter is not specified, font renderer will use this valuedouble
double
getStringWidth
(String text) void
setDefaultShadowState
(boolean state) Sets the default shadow state to be used whenever the shadow parameter is not specifiedsplitString
(String string, double maxWidth) default String
trimStringToWidth
(String string, double width) Methods inherited from interface org.rusherhack.client.api.render.IRenderer
begin, begin, end, getMatrixStack, isBuilding
Methods inherited from interface org.rusherhack.client.api.render.IScissorable
beginScissor, endScissor, popScissorBox, scissorBox
-
Method Details
-
drawString
-
drawString
default double drawString(net.minecraft.network.chat.FormattedText text, double x, double y, int color) -
drawString
default double drawString(net.minecraft.util.FormattedCharSequence text, double x, double y, int color) -
drawString
-
drawString
default double drawString(net.minecraft.network.chat.FormattedText text, double x, double y, int color, boolean shadow) -
drawString
default double drawString(net.minecraft.util.FormattedCharSequence text, double x, double y, int color, boolean shadow) -
drawString
double drawString(com.mojang.blaze3d.vertex.PoseStack matrixStack, String text, double x, double y, int color, boolean shadow) Draws a string at the specified coordinates- Parameters:
matrixStack
- the matrix stack to use if the font renderer is not currently buildingtext
- string to drawx
- x coordinatey
- y coordinatecolor
- argb color of the stringshadow
- whether to draw a shadow- Returns:
- the end x coordinate of the drawn string
-
drawString
double drawString(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.util.FormattedCharSequence text, double x, double y, int color, boolean shadow) Draws a string at the specified coordinates- Parameters:
matrixStack
- the matrix stack to use if the font renderer is not currently buildingtext
- text component to drawx
- x coordinatey
- y coordinatecolor
- argb color of the stringshadow
- whether to draw a shadow- Returns:
- the end x coordinate of the drawn string
-
drawText
default double drawText(String text, double x, double y, int color, double maxWidth, double spacing) -
drawText
default double drawText(String text, double x, double y, int color, boolean shadow, double maxWidth, double spacing) -
drawText
default double drawText(net.minecraft.network.chat.FormattedText text, double x, double y, int color, double maxWidth, double spacing) -
drawText
default double drawText(net.minecraft.network.chat.FormattedText text, double x, double y, int color, boolean shadow, double maxWidth, double spacing) -
drawText
double drawText(com.mojang.blaze3d.vertex.PoseStack matrixStack, String text, double x, double y, int color, boolean shadow, double maxWidth, double spacing) -
drawText
double drawText(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.network.chat.FormattedText text, double x, double y, int color, boolean shadow, double maxWidth, double spacing) -
getStringWidth
-
getFontHeight
double getFontHeight() -
getDefaultShadowState
boolean getDefaultShadowState()If the shadow parameter is not specified, font renderer will use this value- Returns:
- the default shadow state
-
setDefaultShadowState
void setDefaultShadowState(boolean state) Sets the default shadow state to be used whenever the shadow parameter is not specified- Parameters:
state
-
-
splitString
-
trimStringToWidth
-