Interface IFontRenderer

All Superinterfaces:
IRenderer, IScissorable

public interface IFontRenderer extends IRenderer, IScissorable
Interface for font rendering

TODO: documentation

  • Method Summary

    Modifier and Type
    Method
    Description
    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
    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
    default 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
    drawText(String text, double x, double y, int color, double maxWidth, double spacing)
     
    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 value
    double
     
    double
     
    void
    setDefaultShadowState(boolean state)
    Sets the default shadow state to be used whenever the shadow parameter is not specified
    default List<String>
    splitString(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

      default double drawString(String text, double x, double y, int color)
    • 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

      default double drawString(String text, double x, double y, int color, boolean shadow)
    • 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 building
      text - string to draw
      x - x coordinate
      y - y coordinate
      color - argb color of the string
      shadow - 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 building
      text - text component to draw
      x - x coordinate
      y - y coordinate
      color - argb color of the string
      shadow - 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

      double getStringWidth(String text)
    • 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

      default List<String> splitString(String string, double maxWidth)
    • trimStringToWidth

      default String trimStringToWidth(String string, double width)