Class VFPListEntry

java.lang.Object
net.minecraft.client.gui.components.ObjectSelectionList.Entry<VFPListEntry>
com.viaversion.viafabricplus.screen.VFPListEntry
All Implemented Interfaces:
net.minecraft.client.gui.components.events.GuiEventListener, net.minecraft.client.gui.components.TabOrderedElement, net.minecraft.client.gui.layouts.LayoutElement, net.minecraft.client.gui.narration.NarrationSupplier
Direct Known Subclasses:
BedrockRealmsScreen.SlotEntry, BetaCraftScreen.ServerSlot, BooleanListEntry, ButtonListEntry, ClassiCubeServerListScreen.ServerSlot, ModeListEntry, PerServerVersionScreen.SharedSlot, ProtocolSelectionScreen.ProtocolSlot, TitleEntry, VersionedBooleanListEntry

public abstract class VFPListEntry extends net.minecraft.client.gui.components.ObjectSelectionList.Entry<VFPListEntry>
This class is a wrapper for the ObjectSelectionList.Entry class. Features included:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected static final int
     
    static final int
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    extractContent(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, boolean hovered, float deltaTicks)
    Automatically draws a background for the slot with the slot's dimension and calls the mappedRender(GuiGraphicsExtractor, int, int, int, int, int, int, boolean, float) method
    void
    mappedMouseClicked(double mouseX, double mouseY, int button)
     
    void
    mappedRender(net.minecraft.client.gui.GuiGraphicsExtractor context, int x, int y, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta)
     
    boolean
    mouseClicked(net.minecraft.client.input.MouseButtonEvent click, boolean doubled)
    Automatically plays a click sound and calls the mappedMouseClicked(double, double, int) method
    void
    renderScrollableText(net.minecraft.network.chat.Component name, int offset)
     
    void
    renderScrollableText(net.minecraft.network.chat.Component text, int textY, int offset)
    Automatically scrolls the text if it is too long to be displayed in the slot.
    void
    renderTooltip(@Nullable net.minecraft.network.chat.Component tooltip, int mouseX, int mouseY)
    Draws a tooltip if the mouse is hovering over the slot

    Methods inherited from class net.minecraft.client.gui.components.ObjectSelectionList.Entry

    getNarration, updateNarration

    Methods inherited from class Object

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

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

    charTyped, getBorderForArrowNavigation, getCurrentFocusPath, keyPressed, keyReleased, mouseDragged, mouseMoved, mouseReleased, mouseScrolled, nextFocusPath, preeditUpdated, shouldTakeFocusAfterInteraction

    Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement

    setPosition

    Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement

    getTabOrderGroup
  • Field Details

  • Constructor Details

    • VFPListEntry

      public VFPListEntry()
  • Method Details

    • mappedRender

      public void mappedRender(net.minecraft.client.gui.GuiGraphicsExtractor context, int x, int y, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta)
    • mappedMouseClicked

      public void mappedMouseClicked(double mouseX, double mouseY, int button)
    • mouseClicked

      public boolean mouseClicked(net.minecraft.client.input.MouseButtonEvent click, boolean doubled)
      Automatically plays a click sound and calls the mappedMouseClicked(double, double, int) method
      Specified by:
      mouseClicked in interface net.minecraft.client.gui.components.events.GuiEventListener
      Overrides:
      mouseClicked in class net.minecraft.client.gui.components.ObjectSelectionList.Entry<VFPListEntry>
    • renderScrollableText

      public void renderScrollableText(net.minecraft.network.chat.Component name, int offset)
    • renderScrollableText

      public void renderScrollableText(net.minecraft.network.chat.Component text, int textY, int offset)
      Automatically scrolls the text if it is too long to be displayed in the slot. The text will be scrolled from right to left
      Parameters:
      text - The text which should be displayed
      textY - The Y position of the text
      offset - The offset of the text from the left side of the slot, this is used to calculate the width of the text, which should be scrolled
    • renderTooltip

      public void renderTooltip(@Nullable @Nullable net.minecraft.network.chat.Component tooltip, int mouseX, int mouseY)
      Draws a tooltip if the mouse is hovering over the slot
      Parameters:
      tooltip - The tooltip which should be displayed
      mouseX - The current mouse X position
      mouseY - The current mouse Y position
    • extractContent

      public void extractContent(net.minecraft.client.gui.GuiGraphicsExtractor graphics, int mouseX, int mouseY, boolean hovered, float deltaTicks)
      Automatically draws a background for the slot with the slot's dimension and calls the mappedRender(GuiGraphicsExtractor, int, int, int, int, int, int, boolean, float) method