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 p_331917_)
  • Method Details

    • getHeight

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

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

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

      private static int getEmptyBundleBackgroundHeight(Font p_361305_)
    • backgroundHeight

      private int backgroundHeight()
    • itemGridHeight

      private int itemGridHeight()
    • getContentXOffset

      private int getContentXOffset(int p_368639_)
    • gridSizeY

      private int gridSizeY()
    • slotCount

      private int slotCount()
    • renderImage

      public void renderImage(Font p_194042_, int p_194043_, int p_194044_, int p_368730_, int p_368543_, GuiGraphics p_282522_)
      Specified by:
      renderImage in interface ClientTooltipComponent
    • renderEmptyBundleTooltip

      private void renderEmptyBundleTooltip(Font p_365081_, int p_364144_, int p_364357_, int p_368704_, int p_368751_, GuiGraphics p_365036_)
    • renderBundleWithItemsTooltip

      private void renderBundleWithItemsTooltip(Font p_364080_, int p_360498_, int p_363327_, int p_368677_, int p_368508_, GuiGraphics p_360526_)
    • getShownItems

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

      private static boolean shouldRenderSurplusText(boolean p_361034_, int p_363348_, int p_360653_)
    • shouldRenderItemSlot

      private static boolean shouldRenderItemSlot(List<ItemStack> p_362150_, int p_364466_)
    • getAmountOfHiddenItems

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

      private void renderSlot(int p_283180_, int p_282972_, int p_282547_, List<ItemStack> p_361523_, int p_360587_, Font p_281863_, GuiGraphics p_283625_)
    • renderCount

      private static void renderCount(int p_363359_, int p_364432_, int p_364090_, Font p_363903_, GuiGraphics p_363709_)
    • drawSelectedItemTooltip

      private void drawSelectedItemTooltip(Font p_360616_, GuiGraphics p_364594_, int p_362065_, int p_363779_, int p_368494_)
    • drawProgressbar

      private void drawProgressbar(int p_362365_, int p_364597_, Font p_363606_, GuiGraphics p_362696_)
    • drawEmptyBundleDescriptionText

      private static void drawEmptyBundleDescriptionText(int p_363213_, int p_362527_, Font p_361041_, GuiGraphics p_360386_)
    • getEmptyBundleDescriptionTextHeight

      private static int getEmptyBundleDescriptionTextHeight(Font p_363613_)
    • getProgressBarFill

      private int getProgressBarFill()
    • getProgressBarTexture

      private ResourceLocation getProgressBarTexture()
    • getProgressBarFillText

      @Nullable private Component getProgressBarFillText()