Interface IFontRenderer
- All Superinterfaces:
IRenderer,IScissorable
Interface for font rendering
TODO: documentation
-
Method Summary
Modifier and TypeMethodDescriptiondoubledrawString(com.mojang.blaze3d.vertex.PoseStack matrixStack, String text, double x, double y, int color, boolean shadow) Draws a string at the specified coordinatesdoubledrawString(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 doubledrawString(String text, double x, double y, int color) default doubledrawString(String text, double x, double y, int color, boolean shadow) default doubledrawString(net.minecraft.network.chat.FormattedText text, double x, double y, int color) default doubledrawString(net.minecraft.network.chat.FormattedText text, double x, double y, int color, boolean shadow) default doubledrawString(net.minecraft.util.FormattedCharSequence text, double x, double y, int color) default doubledrawString(net.minecraft.util.FormattedCharSequence text, double x, double y, int color, boolean shadow) doubledrawText(com.mojang.blaze3d.vertex.PoseStack matrixStack, String text, double x, double y, int color, boolean shadow, double maxWidth, double spacing) doubledrawText(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 doubledrawText(String text, double x, double y, int color, boolean shadow, double maxWidth, double spacing) default doubledefault doubledrawText(net.minecraft.network.chat.FormattedText text, double x, double y, int color, boolean shadow, double maxWidth, double spacing) default doubledrawText(net.minecraft.network.chat.FormattedText text, double x, double y, int color, double maxWidth, double spacing) booleanIf the shadow parameter is not specified, font renderer will use this valuedoubledoublegetStringWidth(String text) voidsetDefaultShadowState(boolean state) Sets the default shadow state to be used whenever the shadow parameter is not specifiedsplitString(String string, double maxWidth) default StringtrimStringToWidth(String string, double width) Methods inherited from interface org.rusherhack.client.api.render.IRenderer
begin, begin, end, getMatrixStack, isBuildingMethods 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
-