Class ClientBundleTooltip

java.lang.Object
net.minecraft.client.gui.screens.inventory.tooltip.ClientBundleTooltip
All Implemented Interfaces:
ClientTooltipComponent

public class ClientBundleTooltip extends Object implements ClientTooltipComponent
  • Field Details

    • PROGRESSBAR_BORDER_SPRITE

      private static final ResourceLocation PROGRESSBAR_BORDER_SPRITE
    • PROGRESSBAR_FILL_SPRITE

      private static final ResourceLocation PROGRESSBAR_FILL_SPRITE
    • PROGRESSBAR_FULL_SPRITE

      private static final ResourceLocation PROGRESSBAR_FULL_SPRITE
    • SLOT_HIGHLIGHT_BACK_SPRITE

      private static final ResourceLocation SLOT_HIGHLIGHT_BACK_SPRITE
    • SLOT_HIGHLIGHT_FRONT_SPRITE

      private static final ResourceLocation SLOT_HIGHLIGHT_FRONT_SPRITE
    • SLOT_BACKGROUND_SPRITE

      private static final ResourceLocation SLOT_BACKGROUND_SPRITE
    • SLOT_MARGIN

      private static final int SLOT_MARGIN
      See Also:
    • SLOT_SIZE

      private static final int SLOT_SIZE
      See Also:
    • GRID_WIDTH

      private static final int GRID_WIDTH
      See Also:
    • PROGRESSBAR_HEIGHT

      private static final int PROGRESSBAR_HEIGHT
      See Also:
    • PROGRESSBAR_WIDTH

      private static final int PROGRESSBAR_WIDTH
      See Also:
    • PROGRESSBAR_BORDER

      private static final int PROGRESSBAR_BORDER
      See Also:
    • PROGRESSBAR_FILL_MAX

      private static final int PROGRESSBAR_FILL_MAX
      See Also:
    • PROGRESSBAR_MARGIN_Y

      private static final int PROGRESSBAR_MARGIN_Y
      See Also:
    • BUNDLE_FULL_TEXT

      private static final Component BUNDLE_FULL_TEXT
    • BUNDLE_EMPTY_TEXT

      private static final Component BUNDLE_EMPTY_TEXT
    • BUNDLE_EMPTY_DESCRIPTION

      private static final Component BUNDLE_EMPTY_DESCRIPTION
    • contents

      private final BundleContents contents
  • Constructor Details

    • ClientBundleTooltip

      public ClientBundleTooltip(BundleContents pContents)
  • Method Details

    • getHeight

      public int getHeight(Font pFont)
      Specified by:
      getHeight in interface ClientTooltipComponent
    • getWidth

      public int getWidth(Font pFont)
      Specified by:
      getWidth in interface ClientTooltipComponent
    • showTooltipWithItemInHand

      public boolean showTooltipWithItemInHand()
      Specified by:
      showTooltipWithItemInHand in interface ClientTooltipComponent
    • getEmptyBundleBackgroundHeight

      private static int getEmptyBundleBackgroundHeight(Font pFont)
    • backgroundHeight

      private int backgroundHeight()
    • itemGridHeight

      private int itemGridHeight()
    • getContentXOffset

      private int getContentXOffset(int pWidth)
    • gridSizeY

      private int gridSizeY()
    • slotCount

      private int slotCount()
    • renderImage

      public void renderImage(Font pFont, int pX, int pY, int pWidth, int pHeight, GuiGraphics pGuiGraphics)
      Specified by:
      renderImage in interface ClientTooltipComponent
    • renderEmptyBundleTooltip

      private void renderEmptyBundleTooltip(Font pFont, int pX, int pY, int pWidth, int pHeight, GuiGraphics pGuiGraphics)
    • renderBundleWithItemsTooltip

      private void renderBundleWithItemsTooltip(Font pFont, int pX, int pY, int pWidth, int pHeight, GuiGraphics pGuiGraphics)
    • getShownItems

      private List<ItemStack> getShownItems(int pItemsToShow)
    • shouldRenderSurplusText

      private static boolean shouldRenderSurplusText(boolean pHasEnoughItems, int pCellX, int pCellY)
    • shouldRenderItemSlot

      private static boolean shouldRenderItemSlot(List<ItemStack> pShownItems, int pSlotIndex)
    • getAmountOfHiddenItems

      private int getAmountOfHiddenItems(List<ItemStack> pShownItems)
    • renderSlot

      private void renderSlot(int pSlotIndex, int pX, int pY, List<ItemStack> pShownItems, int pSeed, Font pFont, GuiGraphics pGuiGraphics)
    • renderCount

      private static void renderCount(int pSlotX, int pSlotY, int pCount, Font pFont, GuiGraphics pGuiGraphics)
    • drawSelectedItemTooltip

      private void drawSelectedItemTooltip(Font pFont, GuiGraphics pGuiGraphics, int pX, int pY, int pWidth)
    • drawProgressbar

      private void drawProgressbar(int pX, int pY, Font pFont, GuiGraphics pGuiGraphics)
    • drawEmptyBundleDescriptionText

      private static void drawEmptyBundleDescriptionText(int pX, int pY, Font pFont, GuiGraphics pGuiGraphics)
    • getEmptyBundleDescriptionTextHeight

      private static int getEmptyBundleDescriptionTextHeight(Font pFont)
    • getProgressBarFill

      private int getProgressBarFill()
    • getProgressBarTexture

      private ResourceLocation getProgressBarTexture()
    • getProgressBarFillText

      @Nullable private Component getProgressBarFillText()