Class WidgetAnimatedStat

java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.AbstractWidget
me.desht.pneumaticcraft.client.gui.widget.WidgetAnimatedStat
All Implemented Interfaces:
IGuiAnimatedStat, ITickableWidget, ITooltipProvider, net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.Widget, net.minecraft.client.gui.narration.NarratableEntry, net.minecraft.client.gui.narration.NarrationSupplier

public class WidgetAnimatedStat extends net.minecraft.client.gui.components.AbstractWidget implements IGuiAnimatedStat, ITooltipProvider
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static class 
     

    Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry

    net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority
  • Field Summary

    Fields inherited from class net.minecraft.client.gui.components.AbstractWidget

    active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, WIDGETS_LOCATION, width, x, y

    Fields inherited from class net.minecraft.client.gui.GuiComponent

    BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION

    Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    DOUBLE_CLICK_THRESHOLD_MS
  • Constructor Summary

    Constructors
    Constructor
    Description
    WidgetAnimatedStat(net.minecraft.client.gui.screens.Screen gui, int backgroundColor)
     
    WidgetAnimatedStat(net.minecraft.client.gui.screens.Screen gui, int backgroundColor, net.minecraft.resources.ResourceLocation texture)
     
    WidgetAnimatedStat(net.minecraft.client.gui.screens.Screen gui, int backgroundColor, net.minecraft.world.item.ItemStack icon)
     
    WidgetAnimatedStat(net.minecraft.client.gui.screens.Screen gui, net.minecraft.network.chat.Component title, int xPos, int yPos, int backGroundColor, IGuiAnimatedStat statAbove, boolean leftSided)
     
    WidgetAnimatedStat(net.minecraft.client.gui.screens.Screen gui, net.minecraft.network.chat.Component title, WidgetAnimatedStat.StatIcon icon, int xPos, int yPos, int backGroundColor, IGuiAnimatedStat statAbove, boolean leftSided)
     
    WidgetAnimatedStat(net.minecraft.client.gui.screens.Screen gui, net.minecraft.network.chat.Component title, WidgetAnimatedStat.StatIcon icon, int backGroundColor, IGuiAnimatedStat statAbove, StatPanelLayout layout)
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addSubWidget(net.minecraft.client.gui.components.AbstractWidget widget)
    Add a subwidget to the panel.
    void
    addTooltip(double mouseX, double mouseY, List<net.minecraft.network.chat.Component> curTooltip, boolean shiftPressed)
     
    void
    appendText(List<net.minecraft.network.chat.Component> text)
    Appends some more text to the existing text in this stat.
    boolean
    charTyped(char codePoint, int modifiers)
     
    protected boolean
    clicked(double mouseX, double mouseY)
     
    void
    Forces the stat to close.
    int
    Get the background color of this stat.
    int
     
    int
     
    net.minecraft.client.renderer.Rect2i
    Get a bounding box for this stat.
    int
    Get the effective Y position of this stat.
    int
    Returns the Y size of this stat.
    int
    Returns the X size of this stat.
    net.minecraft.network.chat.Component
    Get this stat's title line.
    boolean
    Check if this stat is fully opened.
    boolean
    Check which direction this expands to when opened.
    boolean
    isMouseOver(double mouseX, double mouseY)
     
    boolean
    Check if the stat is currently toggled open (but not necessarily fully-open - see IGuiAnimatedStat.isDoneExpanding())
    boolean
    keyPressed(int keyCode, int scanCode, int modifiers)
     
    boolean
    mouseClicked(double mouseX, double mouseY, int button)
     
    boolean
    mouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY)
     
    boolean
    mouseReleased(double mouseX, double mouseY, int button)
     
    boolean
    mouseScrolled(double x, double y, double dir)
     
    void
    Forces the stat to open.
    void
    removeSubWidget(net.minecraft.client.gui.components.AbstractWidget widget)
     
    void
    renderButton(com.mojang.blaze3d.vertex.PoseStack matrixStack, int mouseX, int mouseY, float partialTicks)
     
    void
    renderStat(com.mojang.blaze3d.vertex.PoseStack matrixStack, int x, int y, float partialTicks)
    Render the stat in 2D (gui) context.
    void
    renderStat(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource buffer, float partialTicks)
    Render the stat in 3D (in-world) context.
    void
    setAutoLineWrap(boolean wrap)
    Enable/disable auto-line-wrapping functionality of the widget.
    void
    setBackgroundColor(int backgroundColor)
    Set the background color of this stat.
    void
    setBaseX(int x)
    Sets the x position of this stat.
    void
    setBaseY(int y)
    Sets the base Y position of this stat (see IGuiAnimatedStat.setParentStat(IGuiAnimatedStat).
    void
    setBeveled(boolean bevel)
    Should this stat be drawn with a beveled edge, or a plain edge? Default behaviour is a beveled edge for GUI side tabs, plain edge for HUD stats.
    void
    setExtraTooltipText(List<net.minecraft.network.chat.Component> extraTooltipText)
     
    void
    setForegroundColor(int foregroundColor)
    Set the foreground color of this stat, which is the color used to render any text which doesn't have explicit formatting styles.
    void
    setLeftSided(boolean leftSided)
    Set the direction this stat will expand in when opened.
    void
    setLineSpacing(int lineSpacing)
    Set the line spacing, in pixels
    void
    setMessage(net.minecraft.network.chat.Component message)
     
    void
    setMinimumContractedDimensions(int minWidth, int minHeight)
    Defines what dimensions the stat should have when it is not expanded (default 17x17, sufficient to display the stat's icon) and resets the stat to these dimensions.
    void
    setMinimumExpandedDimensions(int minWidth, int minHeight)
    Set the minimum width that this stat should expand to, even if the stat's text isn't that wide or tall.
    void
    When this stat gets a parent stat assigned, the effective Y position of this stat should be auto-adjusted to be directly beneath the parent stat.
    void
    setReservedLines(int reservedLines)
    This can be used to reserve one or more lines at the top of the stat; text will only drawn below the reserved area.
    void
    setSubwidgetRenderOffsets(int left, int right)
    Define X offsets for subwidget rendering.
    setText(List<net.minecraft.network.chat.Component> text)
    Sets the main text of this stat.
    setText(net.minecraft.network.chat.Component text)
    Sets the main text of this stat.
    void
    setTexture(net.minecraft.resources.ResourceLocation texture)
    Set the texture to use for the stat's icon
    void
    setTexture(net.minecraft.world.item.ItemStack itemStack)
    Set the texture to use for the stat's icon
    void
    setTitle(net.minecraft.network.chat.Component title)
    Set the title line for this stat; the text drawn on the top line.
    void
    setTitleColor(int titleColor)
    Set the title color of this stat, which is the color used to render the top title line of the stat.
    void
    Called each tick by the Screen.tick() method.
    void
    updateNarration(net.minecraft.client.gui.narration.NarrationElementOutput pNarrationElementOutput)
     

    Methods inherited from class net.minecraft.client.gui.components.AbstractWidget

    changeFocus, clearFGColor, createNarrationMessage, defaultButtonNarrationText, getFGColor, getHeight, getMessage, getWidth, getYImage, isActive, isFocused, isHoveredOrFocused, isValidClickButton, narrationPriority, onClick, onDrag, onFocusedChanged, onRelease, playDownSound, render, renderBg, renderToolTip, setAlpha, setFGColor, setFocused, setHeight, setWidth, wrapDefaultNarrationMessage

    Methods inherited from class net.minecraft.client.gui.GuiComponent

    blit, blit, blit, blit, blit, blitOutlineBlack, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait

    Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener

    changeFocus, keyReleased, mouseMoved

    Methods inherited from interface me.desht.pneumaticcraft.client.gui.widget.ITooltipProvider

    shouldProvide
  • Constructor Details

    • WidgetAnimatedStat

      public WidgetAnimatedStat(net.minecraft.client.gui.screens.Screen gui, net.minecraft.network.chat.Component title, int xPos, int yPos, int backGroundColor, IGuiAnimatedStat statAbove, boolean leftSided)
    • WidgetAnimatedStat

      public WidgetAnimatedStat(net.minecraft.client.gui.screens.Screen gui, int backgroundColor)
    • WidgetAnimatedStat

      public WidgetAnimatedStat(net.minecraft.client.gui.screens.Screen gui, int backgroundColor, net.minecraft.world.item.ItemStack icon)
    • WidgetAnimatedStat

      public WidgetAnimatedStat(net.minecraft.client.gui.screens.Screen gui, int backgroundColor, net.minecraft.resources.ResourceLocation texture)
    • WidgetAnimatedStat

      public WidgetAnimatedStat(net.minecraft.client.gui.screens.Screen gui, net.minecraft.network.chat.Component title, WidgetAnimatedStat.StatIcon icon, int xPos, int yPos, int backGroundColor, IGuiAnimatedStat statAbove, boolean leftSided)
    • WidgetAnimatedStat

      public WidgetAnimatedStat(net.minecraft.client.gui.screens.Screen gui, net.minecraft.network.chat.Component title, WidgetAnimatedStat.StatIcon icon, int backGroundColor, IGuiAnimatedStat statAbove, StatPanelLayout layout)
  • Method Details

    • setMessage

      public void setMessage(net.minecraft.network.chat.Component message)
      Overrides:
      setMessage in class net.minecraft.client.gui.components.AbstractWidget
    • setParentStat

      public void setParentStat(IGuiAnimatedStat stat)
      Description copied from interface: IGuiAnimatedStat
      When this stat gets a parent stat assigned, the effective Y position of this stat should be auto-adjusted to be directly beneath the parent stat. This will cause this stat to move up and down when the parent stat expands/moves.
      Specified by:
      setParentStat in interface IGuiAnimatedStat
      Parameters:
      stat - the parent stat
    • addSubWidget

      public void addSubWidget(net.minecraft.client.gui.components.AbstractWidget widget)
      Description copied from interface: IGuiAnimatedStat
      Add a subwidget to the panel. Subwidgets are automatically rendered by the panel itself, and don't need to be added to your GUI separately.
      Specified by:
      addSubWidget in interface IGuiAnimatedStat
      Parameters:
      widget - the subwidget
    • removeSubWidget

      public void removeSubWidget(net.minecraft.client.gui.components.AbstractWidget widget)
    • setSubwidgetRenderOffsets

      public void setSubwidgetRenderOffsets(int left, int right)
      Description copied from interface: IGuiAnimatedStat
      Define X offsets for subwidget rendering. You should not normally need to call this method.
      Specified by:
      setSubwidgetRenderOffsets in interface IGuiAnimatedStat
      Parameters:
      left - X offset when widget opens to the left
      right - X offset when widget opens to the right
    • isLeftSided

      public boolean isLeftSided()
      Description copied from interface: IGuiAnimatedStat
      Check which direction this expands to when opened.
      Specified by:
      isLeftSided in interface IGuiAnimatedStat
      Returns:
      true if the stat expands to the left (the right edge of the state is anchored to the X position), false if the stat expands to the right
    • setLeftSided

      public void setLeftSided(boolean leftSided)
      Description copied from interface: IGuiAnimatedStat
      Set the direction this stat will expand in when opened.
      Specified by:
      setLeftSided in interface IGuiAnimatedStat
      Parameters:
      leftSided - true if the stat should expand to the left, false if the stat should expand to the right
    • setAutoLineWrap

      public void setAutoLineWrap(boolean wrap)
      Description copied from interface: IGuiAnimatedStat
      Enable/disable auto-line-wrapping functionality of the widget. This is enabled by default. When disabled, the widget will make no effort to keep all text on screen; unwrapped text could extend off the right-hand edge of the screen.
      Specified by:
      setAutoLineWrap in interface IGuiAnimatedStat
      Parameters:
      wrap - enablement of wrapping
    • getTitle

      public net.minecraft.network.chat.Component getTitle()
      Description copied from interface: IGuiAnimatedStat
      Get this stat's title line.
      Specified by:
      getTitle in interface IGuiAnimatedStat
      Returns:
      the title
    • setTitle

      public void setTitle(net.minecraft.network.chat.Component title)
      Description copied from interface: IGuiAnimatedStat
      Set the title line for this stat; the text drawn on the top line. This text is never wrapped, so be mindful of the length of this line.
      Specified by:
      setTitle in interface IGuiAnimatedStat
      Parameters:
      title - the title string
    • setText

      public IGuiAnimatedStat setText(List<net.minecraft.network.chat.Component> text)
      Description copied from interface: IGuiAnimatedStat
      Sets the main text of this stat. Every line should be stored in a separate list element, but lines do not need to be split manually; overlong lines will be automatically by wrapped to fit horizontally (if auto-wrap is enabled), and a scrollbar will be added if necessary.
      Specified by:
      setText in interface IGuiAnimatedStat
      Parameters:
      text - a list of text components
      Returns:
      this, so you can chain calls.
    • setText

      public IGuiAnimatedStat setText(net.minecraft.network.chat.Component text)
      Description copied from interface: IGuiAnimatedStat
      Sets the main text of this stat. Every line should be stored in a separate list element, but lines do not need to be split manually; overlong lines will be automatically by wrapped to fit horizontally (if auto-wrap is enabled), and a scrollbar will be added if necessary.
      Specified by:
      setText in interface IGuiAnimatedStat
      Parameters:
      text - a text component
      Returns:
      this, so you can chain calls.
    • appendText

      public void appendText(List<net.minecraft.network.chat.Component> text)
      Description copied from interface: IGuiAnimatedStat
      Appends some more text to the existing text in this stat. This method will split overlong lines, same as IGuiAnimatedStat.setText(Component)
      Specified by:
      appendText in interface IGuiAnimatedStat
      Parameters:
      text - a list of text components
    • setBackgroundColor

      public void setBackgroundColor(int backgroundColor)
      Description copied from interface: IGuiAnimatedStat
      Set the background color of this stat.
      Specified by:
      setBackgroundColor in interface IGuiAnimatedStat
      Parameters:
      backgroundColor - color, in ARGB format
    • setForegroundColor

      public void setForegroundColor(int foregroundColor)
      Description copied from interface: IGuiAnimatedStat
      Set the foreground color of this stat, which is the color used to render any text which doesn't have explicit formatting styles. The default foreground color is 0xFFFFFFFF, or white.
      Specified by:
      setForegroundColor in interface IGuiAnimatedStat
      Parameters:
      foregroundColor - the foreground color, in ARGB format
    • setTitleColor

      public void setTitleColor(int titleColor)
      Description copied from interface: IGuiAnimatedStat
      Set the title color of this stat, which is the color used to render the top title line of the stat. The default title color is 0xFFFFFF00, or yellow.
      Specified by:
      setTitleColor in interface IGuiAnimatedStat
      Parameters:
      titleColor - the title color, in ARGB format
    • getBackgroundColor

      public int getBackgroundColor()
      Description copied from interface: IGuiAnimatedStat
      Get the background color of this stat.
      Specified by:
      getBackgroundColor in interface IGuiAnimatedStat
      Returns:
      the background color
    • setBeveled

      public void setBeveled(boolean bevel)
      Description copied from interface: IGuiAnimatedStat
      Should this stat be drawn with a beveled edge, or a plain edge? Default behaviour is a beveled edge for GUI side tabs, plain edge for HUD stats. The color of the plain edge is a darkened version of the stat's background color.
      Specified by:
      setBeveled in interface IGuiAnimatedStat
      Parameters:
      bevel - true if a beveled edge should be drawn, false otherwise
    • setReservedLines

      public void setReservedLines(int reservedLines)
      Description copied from interface: IGuiAnimatedStat
      This can be used to reserve one or more lines at the top of the stat; text will only drawn below the reserved area. Useful if you want to have a static area for widget display.
      Specified by:
      setReservedLines in interface IGuiAnimatedStat
      Parameters:
      reservedLines - number of text lines to reserve
    • setMinimumContractedDimensions

      public void setMinimumContractedDimensions(int minWidth, int minHeight)
      Description copied from interface: IGuiAnimatedStat
      Defines what dimensions the stat should have when it is not expanded (default 17x17, sufficient to display the stat's icon) and resets the stat to these dimensions. Stats which should disappear completely when closed (e.g. the Pneumatic Armor HUD stats) should be given a minimum size of 0x0.
      Specified by:
      setMinimumContractedDimensions in interface IGuiAnimatedStat
      Parameters:
      minWidth - the minimum width
      minHeight - the minimum height
    • setMinimumExpandedDimensions

      public void setMinimumExpandedDimensions(int minWidth, int minHeight)
      Description copied from interface: IGuiAnimatedStat
      Set the minimum width that this stat should expand to, even if the stat's text isn't that wide or tall. Use this if you need to ensure sufficient space for subwidgets. You don't need to call this if you're not adding any subwidgets, since the stat's expanded size will be automatically calculated from its text in that case.

      Requesting a width wider than is available (given current screen resolution), or taller than 12 lines of text, will be silently ignored, and clamped to those dimensions. The requested width does not include a 20-pixel margin for drawing a possible scrollbar, and the requested height does not include a 20 pixel margin for drawing the stat's title at the top.

      Specified by:
      setMinimumExpandedDimensions in interface IGuiAnimatedStat
      Parameters:
      minWidth - the desired width, may be 0
      minHeight - the desired height, may be 0
    • tickWidget

      public void tickWidget()
      Description copied from interface: ITickableWidget
      Called each tick by the Screen.tick() method.
      Specified by:
      tickWidget in interface ITickableWidget
    • renderStat

      public void renderStat(com.mojang.blaze3d.vertex.PoseStack matrixStack, int x, int y, float partialTicks)
      Description copied from interface: IGuiAnimatedStat
      Render the stat in 2D (gui) context.
      Specified by:
      renderStat in interface IGuiAnimatedStat
      Parameters:
      matrixStack - the matrix stack
      x - the mouse X position
      y - the mouse Y position
      partialTicks - partial ticks since last client tick
    • clicked

      protected boolean clicked(double mouseX, double mouseY)
      Overrides:
      clicked in class net.minecraft.client.gui.components.AbstractWidget
    • renderButton

      public void renderButton(com.mojang.blaze3d.vertex.PoseStack matrixStack, int mouseX, int mouseY, float partialTicks)
      Overrides:
      renderButton in class net.minecraft.client.gui.components.AbstractWidget
    • renderStat

      public void renderStat(com.mojang.blaze3d.vertex.PoseStack matrixStack, net.minecraft.client.renderer.MultiBufferSource buffer, float partialTicks)
      Description copied from interface: IGuiAnimatedStat
      Render the stat in 3D (in-world) context.
      Specified by:
      renderStat in interface IGuiAnimatedStat
      Parameters:
      matrixStack - the matrix stack
      buffer - the render buffer
      partialTicks - partial ticks since last client tick
    • isMouseOver

      public boolean isMouseOver(double mouseX, double mouseY)
      Specified by:
      isMouseOver in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      isMouseOver in class net.minecraft.client.gui.components.AbstractWidget
    • mouseClicked

      public boolean mouseClicked(double mouseX, double mouseY, int button)
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      mouseClicked in class net.minecraft.client.gui.components.AbstractWidget
    • mouseReleased

      public boolean mouseReleased(double mouseX, double mouseY, int button)
      Specified by:
      mouseReleased in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      mouseReleased in class net.minecraft.client.gui.components.AbstractWidget
    • mouseDragged

      public boolean mouseDragged(double mouseX, double mouseY, int button, double dragX, double dragY)
      Specified by:
      mouseDragged in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      mouseDragged in class net.minecraft.client.gui.components.AbstractWidget
    • mouseScrolled

      public boolean mouseScrolled(double x, double y, double dir)
      Specified by:
      mouseScrolled in interface net.minecraft.client.gui.components.events.GuiEventListener
    • keyPressed

      public boolean keyPressed(int keyCode, int scanCode, int modifiers)
      Specified by:
      keyPressed in interface net.minecraft.client.gui.components.events.GuiEventListener
    • charTyped

      public boolean charTyped(char codePoint, int modifiers)
      Specified by:
      charTyped in interface net.minecraft.client.gui.components.events.GuiEventListener
    • closeStat

      public void closeStat()
      Description copied from interface: IGuiAnimatedStat
      Forces the stat to close.
      Specified by:
      closeStat in interface IGuiAnimatedStat
    • openStat

      public void openStat()
      Description copied from interface: IGuiAnimatedStat
      Forces the stat to open.
      Specified by:
      openStat in interface IGuiAnimatedStat
    • isStatOpen

      public boolean isStatOpen()
      Description copied from interface: IGuiAnimatedStat
      Check if the stat is currently toggled open (but not necessarily fully-open - see IGuiAnimatedStat.isDoneExpanding())
      Specified by:
      isStatOpen in interface IGuiAnimatedStat
      Returns:
      true if the stat is open
    • getEffectiveY

      public int getEffectiveY()
      Description copied from interface: IGuiAnimatedStat
      Get the effective Y position of this stat. This is the same as getBaseY when there is no parent stat, but if there is one, this method returns the value described in IGuiAnimatedStat.setParentStat(IGuiAnimatedStat). This is the position used to render the stat, and to define the area where keyboard and mouse input is checked for.
      Specified by:
      getEffectiveY in interface IGuiAnimatedStat
      Returns:
      the effective Y position
    • getBaseX

      public int getBaseX()
      Specified by:
      getBaseX in interface IGuiAnimatedStat
    • getBaseY

      public int getBaseY()
      Specified by:
      getBaseY in interface IGuiAnimatedStat
    • getStatHeight

      public int getStatHeight()
      Description copied from interface: IGuiAnimatedStat
      Returns the Y size of this stat.
      Specified by:
      getStatHeight in interface IGuiAnimatedStat
      Returns:
      the stat's height
    • getStatWidth

      public int getStatWidth()
      Description copied from interface: IGuiAnimatedStat
      Returns the X size of this stat.
      Specified by:
      getStatWidth in interface IGuiAnimatedStat
      Returns:
      the stat's width
    • setBaseY

      public void setBaseY(int y)
      Description copied from interface: IGuiAnimatedStat
      Sets the base Y position of this stat (see IGuiAnimatedStat.setParentStat(IGuiAnimatedStat).
      Specified by:
      setBaseY in interface IGuiAnimatedStat
      Parameters:
      y - the Y position
    • setBaseX

      public void setBaseX(int x)
      Description copied from interface: IGuiAnimatedStat
      Sets the x position of this stat.
      Specified by:
      setBaseX in interface IGuiAnimatedStat
      Parameters:
      x - the X position
    • isDoneExpanding

      public boolean isDoneExpanding()
      Description copied from interface: IGuiAnimatedStat
      Check if this stat is fully opened.
      Specified by:
      isDoneExpanding in interface IGuiAnimatedStat
      Returns:
      true if the stat is done with expanding (when text and subwidgets will be displayed)
    • getBounds

      public net.minecraft.client.renderer.Rect2i getBounds()
      Description copied from interface: IGuiAnimatedStat
      Get a bounding box for this stat.
      Specified by:
      getBounds in interface IGuiAnimatedStat
      Returns:
      a bounding box
    • addTooltip

      public void addTooltip(double mouseX, double mouseY, List<net.minecraft.network.chat.Component> curTooltip, boolean shiftPressed)
      Specified by:
      addTooltip in interface ITooltipProvider
    • setExtraTooltipText

      public void setExtraTooltipText(List<net.minecraft.network.chat.Component> extraTooltipText)
    • setLineSpacing

      public void setLineSpacing(int lineSpacing)
      Description copied from interface: IGuiAnimatedStat
      Set the line spacing, in pixels
      Specified by:
      setLineSpacing in interface IGuiAnimatedStat
      Parameters:
      lineSpacing - the line spacing
    • setTexture

      public void setTexture(net.minecraft.resources.ResourceLocation texture)
      Description copied from interface: IGuiAnimatedStat
      Set the texture to use for the stat's icon
      Specified by:
      setTexture in interface IGuiAnimatedStat
      Parameters:
      texture - resource location of a texture image, which should be 16x16 exactly
    • setTexture

      public void setTexture(net.minecraft.world.item.ItemStack itemStack)
      Description copied from interface: IGuiAnimatedStat
      Set the texture to use for the stat's icon
      Specified by:
      setTexture in interface IGuiAnimatedStat
      Parameters:
      itemStack - an item to use for the texture
    • updateNarration

      public void updateNarration(net.minecraft.client.gui.narration.NarrationElementOutput pNarrationElementOutput)
      Specified by:
      updateNarration in interface net.minecraft.client.gui.narration.NarrationSupplier