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 contents)
  • 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 font)
    • backgroundHeight

      private int backgroundHeight()
    • itemGridHeight

      private int itemGridHeight()
    • getContentXOffset

      private int getContentXOffset(int width)
    • 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 font, int x, int y, int width, int height, GuiGraphics guiGraphics)
    • renderBundleWithItemsTooltip

      private void renderBundleWithItemsTooltip(Font font, int x, int y, int width, int height, GuiGraphics guiGraphics)
    • getShownItems

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

      private static boolean shouldRenderSurplusText(boolean hasEnoughItems, int cellX, int cellY)
    • shouldRenderItemSlot

      private static boolean shouldRenderItemSlot(List<ItemStack> shownItems, int slotIndex)
    • getAmountOfHiddenItems

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

      private void renderSlot(int slotIndex, int x, int y, List<ItemStack> shownItems, int seed, Font font, GuiGraphics guiGraphics)
    • renderCount

      private static void renderCount(int slotX, int slotY, int count, Font font, GuiGraphics guiGraphics)
    • drawSelectedItemTooltip

      private void drawSelectedItemTooltip(Font font, GuiGraphics guiGraphics, int x, int y, int width)
    • drawProgressbar

      private void drawProgressbar(int x, int y, Font font, GuiGraphics guiGraphics)
    • drawEmptyBundleDescriptionText

      private static void drawEmptyBundleDescriptionText(int x, int y, Font font, GuiGraphics guiGraphics)
    • getEmptyBundleDescriptionTextHeight

      private static int getEmptyBundleDescriptionTextHeight(Font font)
    • getProgressBarFill

      private int getProgressBarFill()
    • getProgressBarTexture

      private ResourceLocation getProgressBarTexture()
    • getProgressBarFillText

      @Nullable private Component getProgressBarFillText()