Class GuiGraphics

java.lang.Object
net.minecraft.client.gui.GuiGraphics
All Implemented Interfaces:
IGuiGraphicsExtension

public class GuiGraphics extends Object implements IGuiGraphicsExtension
  • Field Details

  • Constructor Details

  • Method Details

    • guiWidth

      public int guiWidth()
    • guiHeight

      public int guiHeight()
    • pose

      public PoseStack pose()
    • flush

      public void flush()
    • hLine

      public void hLine(int minX, int maxX, int y, int color)
      Draws a horizontal line from minX to maxX at the specified y-coordinate with the given color.
      Parameters:
      minX - the x-coordinate of the start point.
      maxX - the x-coordinate of the end point.
      y - the y-coordinate of the line.
      color - the color of the line.
    • hLine

      public void hLine(RenderType renderType, int minX, int maxX, int y, int color)
      Draws a horizontal line from minX to maxX at the specified y-coordinate with the given color using the specified render type.
      Parameters:
      renderType - the render type to use.
      minX - the x-coordinate of the start point.
      maxX - the x-coordinate of the end point.
      y - the y-coordinate of the line.
      color - the color of the line.
    • vLine

      public void vLine(int x, int minY, int maxY, int color)
      Draws a vertical line from minY to maxY at the specified x-coordinate with the given color.
      Parameters:
      x - the x-coordinate of the line.
      minY - the y-coordinate of the start point.
      maxY - the y-coordinate of the end point.
      color - the color of the line.
    • vLine

      public void vLine(RenderType renderType, int x, int minY, int maxY, int color)
      Draws a vertical line from minY to maxY at the specified x-coordinate with the given color using the specified render type.
      Parameters:
      renderType - the render type to use.
      x - the x-coordinate of the line.
      minY - the y-coordinate of the start point.
      maxY - the y-coordinate of the end point.
      color - the color of the line.
    • enableScissor

      public void enableScissor(int minX, int minY, int maxX, int maxY)
      Enables scissoring with the specified screen coordinates.
      Parameters:
      minX - the minimum x-coordinate of the scissor region.
      minY - the minimum y-coordinate of the scissor region.
      maxX - the maximum x-coordinate of the scissor region.
      maxY - the maximum y-coordinate of the scissor region.
    • disableScissor

      public void disableScissor()
    • containsPointInScissor

      public boolean containsPointInScissor(int x, int y)
    • applyScissor

      private void applyScissor(@Nullable ScreenRectangle rectangle)
      Applies scissoring based on the provided screen rectangle.
      Parameters:
      rectangle - the screen rectangle to apply scissoring with. Can be null to disable scissoring.
    • fill

      public void fill(int minX, int minY, int maxX, int maxY, int color)
      Fills a rectangle with the specified color using the given coordinates as the boundaries.
      Parameters:
      minX - the minimum x-coordinate of the rectangle.
      minY - the minimum y-coordinate of the rectangle.
      maxX - the maximum x-coordinate of the rectangle.
      maxY - the maximum y-coordinate of the rectangle.
      color - the color to fill the rectangle with.
    • fill

      public void fill(int minX, int minY, int maxX, int maxY, int z, int color)
      Fills a rectangle with the specified color and z-level using the given coordinates as the boundaries.
      Parameters:
      minX - the minimum x-coordinate of the rectangle.
      minY - the minimum y-coordinate of the rectangle.
      maxX - the maximum x-coordinate of the rectangle.
      maxY - the maximum y-coordinate of the rectangle.
      z - the z-level of the rectangle.
      color - the color to fill the rectangle with.
    • fill

      public void fill(RenderType renderType, int minX, int minY, int maxX, int maxY, int color)
      Fills a rectangle with the specified color using the given render type and coordinates as the boundaries.
      Parameters:
      renderType - the render type to use.
      minX - the minimum x-coordinate of the rectangle.
      minY - the minimum y-coordinate of the rectangle.
      maxX - the maximum x-coordinate of the rectangle.
      maxY - the maximum y-coordinate of the rectangle.
      color - the color to fill the rectangle with.
    • fill

      public void fill(RenderType renderType, int minX, int minY, int maxX, int maxY, int z, int color)
      Fills a rectangle with the specified color and z-level using the given render type and coordinates as the boundaries.
      Parameters:
      renderType - the render type to use.
      minX - the minimum x-coordinate of the rectangle.
      minY - the minimum y-coordinate of the rectangle.
      maxX - the maximum x-coordinate of the rectangle.
      maxY - the maximum y-coordinate of the rectangle.
      z - the z-level of the rectangle.
      color - the color to fill the rectangle with.
    • fillGradient

      public void fillGradient(int x1, int y1, int x2, int y2, int colorFrom, int colorTo)
      Fills a rectangle with a gradient color from colorFrom to colorTo using the given coordinates as the boundaries.
      Parameters:
      x1 - the x-coordinate of the first corner of the rectangle.
      y1 - the y-coordinate of the first corner of the rectangle.
      x2 - the x-coordinate of the second corner of the rectangle.
      y2 - the y-coordinate of the second corner of the rectangle.
      colorFrom - the starting color of the gradient.
      colorTo - the ending color of the gradient.
    • fillGradient

      public void fillGradient(int x1, int y1, int x2, int y2, int z, int colorFrom, int colorTo)
      Fills a rectangle with a gradient color from colorFrom to colorTo at the specified z-level using the given coordinates as the boundaries.
      Parameters:
      x1 - the x-coordinate of the first corner of the rectangle.
      y1 - the y-coordinate of the first corner of the rectangle.
      x2 - the x-coordinate of the second corner of the rectangle.
      y2 - the y-coordinate of the second corner of the rectangle.
      z - the z-level of the rectangle.
      colorFrom - the starting color of the gradient.
      colorTo - the ending color of the gradient.
    • fillGradient

      public void fillGradient(RenderType renderType, int x1, int y1, int x2, int y2, int colorFrom, int colorTo, int z)
      Fills a rectangle with a gradient color from colorFrom to colorTo at the specified z-level using the given render type and coordinates as the boundaries.
      Parameters:
      renderType - the render type to use.
      x1 - the x-coordinate of the first corner of the rectangle.
      y1 - the y-coordinate of the first corner of the rectangle.
      x2 - the x-coordinate of the second corner of the rectangle.
      y2 - the y-coordinate of the second corner of the rectangle.
      colorFrom - the starting color of the gradient.
      colorTo - the ending color of the gradient.
      z - the z-level of the rectangle.
    • fillGradient

      private void fillGradient(VertexConsumer consumer, int x1, int y1, int x2, int y2, int z, int colorFrom, int colorTo)
      The core `fillGradient` method.

      Fills a rectangle with a gradient color from colorFrom to colorTo at the specified z-level using the given render type and coordinates as the boundaries.

      Parameters:
      consumer - the VertexConsumer object for drawing the vertices on screen.
      x1 - the x-coordinate of the first corner of the rectangle.
      y1 - the y-coordinate of the first corner of the rectangle.
      x2 - the x-coordinate of the second corner of the rectangle.
      y2 - the y-coordinate of the second corner of the rectangle.
      z - the z-level of the rectangle.
      colorFrom - the starting color of the gradient.
      colorTo - the ending color of the gradient.
    • fillRenderType

      public void fillRenderType(RenderType renderType, int x1, int y1, int x2, int y2, int z)
    • drawCenteredString

      public void drawCenteredString(Font font, String text, int x, int y, int color)
      Draws a centered string at the specified coordinates using the given font, text, and color.
      Parameters:
      font - the font to use for rendering.
      text - the text to draw.
      x - the x-coordinate of the center of the string.
      y - the y-coordinate of the string.
      color - the color of the string.
    • drawCenteredString

      public void drawCenteredString(Font font, Component text, int x, int y, int color)
      Draws a centered string at the specified coordinates using the given font, text component, and color.
      Parameters:
      font - the font to use for rendering.
      text - the text component to draw.
      x - the x-coordinate of the center of the string.
      y - the y-coordinate of the string.
      color - the color of the string.
    • drawCenteredString

      public void drawCenteredString(Font font, FormattedCharSequence text, int x, int y, int color)
      Draws a centered string at the specified coordinates using the given font, formatted character sequence, and color.
      Parameters:
      font - the font to use for rendering.
      text - the formatted character sequence to draw.
      x - the x-coordinate of the center of the string.
      y - the y-coordinate of the string.
      color - the color of the string.
    • drawString

      public int drawString(Font font, @Nullable String text, int x, int y, int color)
      Draws a string at the specified coordinates using the given font, text, and color. Returns the width of the drawn string.

      Parameters:
      font - the font to use for rendering.
      text - the text to draw.
      x - the x-coordinate of the string.
      y - the y-coordinate of the string.
      color - the color of the string.
      Returns:
      the width of the drawn string.
    • drawString

      public int drawString(Font font, @Nullable String text, int x, int y, int color, boolean dropShadow)
      Draws a string at the specified coordinates using the given font, text, color, and drop shadow. Returns the width of the drawn string.

      Parameters:
      font - the font to use for rendering.
      text - the text to draw.
      x - the x-coordinate of the string.
      y - the y-coordinate of the string.
      color - the color of the string.
      dropShadow - whether to apply a drop shadow to the string.
      Returns:
      the width of the drawn string.
    • drawString

      public int drawString(Font p_283343_, @Nullable String p_281896_, float p_283569_, float p_283418_, int p_281560_, boolean p_282130_)
    • drawString

      public int drawString(Font font, FormattedCharSequence text, int x, int y, int color)
      Draws a formatted character sequence at the specified coordinates using the given font, text, and color. Returns the width of the drawn string.

      Parameters:
      font - the font to use for rendering.
      text - the formatted character sequence to draw.
      x - the x-coordinate of the string.
      y - the y-coordinate of the string.
      color - the color of the string
      Returns:
      the width of the drawn string.
    • drawString

      public int drawString(Font font, FormattedCharSequence text, int x, int y, int color, boolean dropShadow)
      Draws a formatted character sequence at the specified coordinates using the given font, text, color, and drop shadow. Returns the width of the drawn string.

      Parameters:
      font - the font to use for rendering.
      text - the formatted character sequence to draw.
      x - the x-coordinate of the string.
      y - the y-coordinate of the string.
      color - the color of the string.
      dropShadow - whether to apply a drop shadow to the string.
      Returns:
      returns the width of the drawn string.
    • drawString

      public int drawString(Font p_282636_, FormattedCharSequence p_281596_, float p_281586_, float p_282816_, int p_281743_, boolean p_282394_)
    • drawString

      public int drawString(Font font, Component text, int x, int y, int color)
      Draws a component's visual order text at the specified coordinates using the given font, text component, and color.

      Parameters:
      font - the font to use for rendering.
      text - the text component to draw.
      x - the x-coordinate of the string.
      y - the y-coordinate of the string.
      color - the color of the string.
      Returns:
      the width of the drawn string.
    • drawString

      public int drawString(Font font, Component text, int x, int y, int color, boolean dropShadow)
      Draws a component's visual order text at the specified coordinates using the given font, text component, color, and drop shadow.

      Parameters:
      font - the font to use for rendering.
      text - the text component to draw.
      x - the x-coordinate of the string.
      y - the y-coordinate of the string.
      color - the color of the string.
      dropShadow - whether to apply a drop shadow to the string.
      Returns:
      the width of the drawn string.
    • drawWordWrap

      public void drawWordWrap(Font font, FormattedText text, int x, int y, int lineWidth, int color)
      Draws a formatted text with word wrapping at the specified coordinates using the given font, text, line width, and color.
      Parameters:
      font - the font to use for rendering.
      text - the formatted text to draw.
      x - the x-coordinate of the starting position.
      y - the y-coordinate of the starting position.
      lineWidth - the maximum width of each line before wrapping.
      color - the color of the text.
    • drawWordWrap

      public void drawWordWrap(Font font, FormattedText text, int x, int y, int lineWidth, int color, boolean dropShadow)
    • drawStringWithBackdrop

      public int drawStringWithBackdrop(Font font, Component text, int x, int y, int xOffset, int color)
    • renderOutline

      public void renderOutline(int x, int y, int width, int height, int color)
      Renders an outline rectangle on the screen with the specified color.
      Parameters:
      x - the x-coordinate of the top-left corner of the rectangle.
      y - the y-coordinate of the top-left corner of the rectangle.
      width - the width of the blitted portion.
      height - the height of the rectangle.
      color - the color of the outline.
    • blitSprite

      public void blitSprite(Function<ResourceLocation,RenderType> renderTypeGetter, ResourceLocation sprite, int x, int y, int width, int height)
    • blitSprite

      public void blitSprite(Function<ResourceLocation,RenderType> renderTypeGetter, ResourceLocation sprite, int x, int y, int width, int height, int blitOffset)
    • blitSprite

      public void blitSprite(Function<ResourceLocation,RenderType> renderTypeGetter, ResourceLocation sprite, int textureWidth, int textureHeight, int uPosition, int vPosition, int x, int y, int uWidth, int vHeight)
    • blitSprite

      public void blitSprite(Function<ResourceLocation,RenderType> renderTypeGetter, TextureAtlasSprite sprite, int x, int y, int width, int height)
    • blitSprite

      public void blitSprite(Function<ResourceLocation,RenderType> renderTypeGetter, TextureAtlasSprite sprite, int x, int y, int width, int height, int blitOffset)
    • blitSprite

      private void blitSprite(Function<ResourceLocation,RenderType> renderTypeGetter, TextureAtlasSprite sprite, int textureWidth, int textureHeight, int uPosition, int vPosition, int x, int y, int uWidth, int vHeight, int blitOffset)
    • blitNineSlicedSprite

      private void blitNineSlicedSprite(Function<ResourceLocation,RenderType> renderTypeGetter, TextureAtlasSprite sprite, GuiSpriteScaling.NineSlice nineSlice, int x, int y, int blitOffset, int width, int height)
    • blitNineSliceInnerSegment

      private void blitNineSliceInnerSegment(Function<ResourceLocation,RenderType> renderTypeGetter, GuiSpriteScaling.NineSlice nineSlice, TextureAtlasSprite sprite, int x, int y, int width, int height, int uPosition, int vPosition, int spriteWidth, int spriteHeight, int nineSliceWidth, int nineSliceHeight, int blitOffset)
    • blitTiledSprite

      private void blitTiledSprite(Function<ResourceLocation,RenderType> renderTypeGetter, TextureAtlasSprite sprite, int x, int y, int width, int height, int uPosition, int vPosition, int spriteWidth, int spriteHeight, int nineSliceWidth, int nineSliceHeight, int blitOffset)
    • blit

      public void blit(Function<ResourceLocation,RenderType> renderTypeGetter, ResourceLocation atlasLocation, int x, int y, float uOffset, float vOffset, int uWidth, int vHeight, int textureWidth, int textureHeight, int color)
    • blit

      public void blit(Function<ResourceLocation,RenderType> renderTypeGetter, ResourceLocation atlasLocation, int x, int y, float uOffset, float vOffset, int uWidth, int vHeight, int textureWidth, int textureHeight)
    • blit

      public void blit(Function<ResourceLocation,RenderType> renderTypeGetter, ResourceLocation atlasLocation, int x, int y, float uOffset, float vOffset, int uWidth, int vHeight, int width, int height, int textureWidth, int textureHeight)
    • blit

      public void blit(Function<ResourceLocation,RenderType> renderTypeGetter, ResourceLocation atlasLocation, int x, int y, float uOffset, float vOffset, int uWidth, int vHeight, int width, int height, int textureWidth, int textureHeight, int color)
    • innerBlit

      private void innerBlit(Function<ResourceLocation,RenderType> renderTypeGetter, ResourceLocation atlasLocation, int x1, int x2, int y1, int y2, float minU, float maxU, float minV, float maxV, int color)
    • renderItem

      public void renderItem(ItemStack stack, int x, int y)
      Renders an item stack at the specified coordinates.
      Parameters:
      stack - the item stack to render.
      x - the x-coordinate of the rendering position.
      y - the y-coordinate of the rendering position.
    • renderItem

      public void renderItem(ItemStack stack, int x, int y, int seed)
      Renders an item stack at the specified coordinates with a random seed.
      Parameters:
      stack - the item stack to render.
      x - the x-coordinate of the rendering position.
      y - the y-coordinate of the rendering position.
      seed - the random seed.
    • renderItem

      public void renderItem(ItemStack stack, int x, int y, int seed, int guiOffset)
      Renders an item stack at the specified coordinates with a random seed and a custom value.
      Parameters:
      stack - the item stack to render.
      x - the x-coordinate of the rendering position.
      y - the y-coordinate of the rendering position.
      seed - the random seed.
      guiOffset - the GUI offset.
    • renderFakeItem

      public void renderFakeItem(ItemStack stack, int x, int y)
      Renders a fake item stack at the specified coordinates.
      Parameters:
      stack - the fake item stack to render.
      x - the x-coordinate of the rendering position.
      y - the y-coordinate of the rendering position.
    • renderFakeItem

      public void renderFakeItem(ItemStack stack, int x, int y, int seed)
    • renderItem

      public void renderItem(LivingEntity entity, ItemStack stack, int x, int y, int seed)
      Renders an item stack for a living entity at the specified coordinates with a random seed.
      Parameters:
      entity - the living entity.
      stack - the item stack to render.
      x - the x-coordinate of the rendering position.
      y - the y-coordinate of the rendering position.
      seed - the random seed.
    • renderItem

      private void renderItem(@Nullable LivingEntity entity, @Nullable Level level, ItemStack stack, int x, int y, int seed)
      Renders an item stack for a living entity in a specific level at the specified coordinates with a random seed.
      Parameters:
      entity - the living entity. Can be null.
      level - the level in which the rendering occurs. Can be null.
      stack - the item stack to render.
      x - the x-coordinate of the rendering position.
      y - the y-coordinate of the rendering position.
      seed - the random seed.
    • renderItem

      private void renderItem(@Nullable LivingEntity entity, @Nullable Level level, ItemStack stack, int x, int y, int seed, int guiOffset)
      Renders an item stack for a living entity in a specific level at the specified coordinates with a random seed and a custom GUI offset.
      Parameters:
      entity - the living entity. Can be null.
      level - the level in which the rendering occurs. Can be null.
      stack - the item stack to render.
      x - the x-coordinate of the rendering position.
      y - the y-coordinate of the rendering position.
      seed - the random seed.
      guiOffset - the GUI offset value.
    • renderItemDecorations

      public void renderItemDecorations(Font font, ItemStack stack, int x, int y)
      Renders additional decorations for an item stack at the specified coordinates.
      Parameters:
      font - the font used for rendering text.
      stack - the item stack to decorate.
      x - the x-coordinate of the rendering position.
      y - the y-coordinate of the rendering position.
    • renderItemDecorations

      public void renderItemDecorations(Font font, ItemStack stack, int x, int y, @Nullable String text)
      Renders additional decorations for an item stack at the specified coordinates with optional custom text.
      Parameters:
      font - the font used for rendering text.
      stack - the item stack to decorate.
      x - the x-coordinate of the rendering position.
      y - the y-coordinate of the rendering position.
      text - the custom text to display. Can be null.
    • renderTooltip

      public void renderTooltip(Font font, ItemStack stack, int mouseX, int mouseY)
      Renders a tooltip for an item stack at the specified mouse coordinates.
      Parameters:
      font - the font used for rendering text.
      stack - the item stack to display the tooltip for.
      mouseX - the x-coordinate of the mouse position.
      mouseY - the y-coordinate of the mouse position.
    • renderTooltip

      public void renderTooltip(Font font, List<Component> textComponents, Optional<TooltipComponent> tooltipComponent, ItemStack stack, int mouseX, int mouseY)
    • renderTooltip

      public void renderTooltip(Font font, List<Component> textComponents, Optional<TooltipComponent> tooltipComponent, ItemStack stack, int mouseX, int mouseY, @Nullable ResourceLocation backgroundTexture)
    • renderTooltip

      public void renderTooltip(Font font, List<Component> tooltipLines, Optional<TooltipComponent> visualTooltipComponent, int mouseX, int mouseY)
      Renders a tooltip with customizable components at the specified mouse coordinates.
      Parameters:
      font - the font used for rendering text.
      tooltipLines - the lines of the tooltip.
      visualTooltipComponent - the visual tooltip component. Can be empty.
      mouseX - the x-coordinate of the mouse position.
      mouseY - the y-coordinate of the mouse position.
    • renderTooltip

      public void renderTooltip(Font font, List<Component> tooltipLines, Optional<TooltipComponent> visualTooltipComponent, int mouseX, int mouseY, @Nullable ResourceLocation sprite)
    • renderTooltip

      public void renderTooltip(Font font, Component text, int mouseX, int mouseY)
      Renders a tooltip with a single line of text at the specified mouse coordinates.
      Parameters:
      font - the font used for rendering text.
      text - the text to display in the tooltip.
      mouseX - the x-coordinate of the mouse position.
      mouseY - the y-coordinate of the mouse position.
    • renderTooltip

      public void renderTooltip(Font font, Component text, int mouseX, int mouseY, @Nullable ResourceLocation sprite)
    • renderComponentTooltip

      public void renderComponentTooltip(Font font, List<Component> tooltipLines, int mouseX, int mouseY)
      Renders a tooltip with multiple lines of component-based text at the specified mouse coordinates.
      Parameters:
      font - the font used for rendering text.
      tooltipLines - the lines of the tooltip as components.
      mouseX - the x-coordinate of the mouse position.
      mouseY - the y-coordinate of the mouse position.
    • renderComponentTooltip

      public void renderComponentTooltip(Font font, List<Component> tooltipLines, int mouseX, int mouseY, @Nullable ResourceLocation sprite)
    • renderComponentTooltip

      public void renderComponentTooltip(Font font, List<? extends FormattedText> tooltipLines, int mouseX, int mouseY, ItemStack stack)
      Renders a tooltip with multiple lines of component-based text at the specified mouse coordinates.
      Parameters:
      font - the font used for rendering text.
      tooltipLines - the lines of the tooltip as components.
      mouseX - the x-coordinate of the mouse position.
      mouseY - the y-coordinate of the mouse position.
    • renderComponentTooltip

      public void renderComponentTooltip(Font font, List<? extends FormattedText> tooltipLines, int mouseX, int mouseY, ItemStack stack, @Nullable ResourceLocation backgroundTexture)
      Renders a tooltip with multiple lines of component-based text at the specified mouse coordinates.
      Parameters:
      font - the font used for rendering text.
      tooltipLines - the lines of the tooltip as components.
      mouseX - the x-coordinate of the mouse position.
      mouseY - the y-coordinate of the mouse position.
    • renderComponentTooltipFromElements

      public void renderComponentTooltipFromElements(Font font, List<com.mojang.datafixers.util.Either<FormattedText,TooltipComponent>> elements, int mouseX, int mouseY, ItemStack stack)
    • renderComponentTooltipFromElements

      public void renderComponentTooltipFromElements(Font font, List<com.mojang.datafixers.util.Either<FormattedText,TooltipComponent>> elements, int mouseX, int mouseY, ItemStack stack, @Nullable ResourceLocation backgroundTexture)
    • renderTooltip

      public void renderTooltip(Font font, List<? extends FormattedCharSequence> tooltipLines, int mouseX, int mouseY)
      Renders a tooltip with multiple lines of formatted text at the specified mouse coordinates.
      Parameters:
      font - the font used for rendering text.
      tooltipLines - the lines of the tooltip as formatted character sequences.
      mouseX - the x-coordinate of the mouse position.
      mouseY - the y-coordinate of the mouse position.
    • renderTooltip

      public void renderTooltip(Font font, List<? extends FormattedCharSequence> tooltipLines, int mouseX, int mouseY, @Nullable ResourceLocation sprite)
    • renderTooltip

      public void renderTooltip(Font font, List<FormattedCharSequence> tooltipLines, ClientTooltipPositioner tooltipPositioner, int mouseX, int mouseY)
      Renders a tooltip with multiple lines of formatted text using a custom tooltip positioner at the specified mouse coordinates.
      Parameters:
      font - the font used for rendering text.
      tooltipLines - the lines of the tooltip as formatted character sequences.
      tooltipPositioner - the positioner to determine the tooltip's position.
      mouseX - the x-coordinate of the mouse position.
      mouseY - the y-coordinate of the mouse position.
    • renderTooltipInternal

      private void renderTooltipInternal(Font font, List<ClientTooltipComponent> tooltipLines, int mouseX, int mouseY, ClientTooltipPositioner tooltipPositioner, @Nullable ResourceLocation sprite)
    • renderItemBar

      private void renderItemBar(ItemStack stack, int x, int y)
    • renderItemCount

      private void renderItemCount(Font font, ItemStack stack, int x, int y, @Nullable String text)
    • renderItemCooldown

      private void renderItemCooldown(ItemStack stack, int x, int y)
    • renderComponentHoverEffect

      public void renderComponentHoverEffect(Font font, @Nullable Style style, int mouseX, int mouseY)
      Renders a hover effect for a text component at the specified mouse coordinates.
      Parameters:
      font - the font used for rendering text.
      style - the style of the text component. Can be null.
      mouseX - the x-coordinate of the mouse position.
      mouseY - the y-coordinate of the mouse position.
    • drawSpecial

      public void drawSpecial(Consumer<MultiBufferSource> drawer)