Class ClientBundleTooltip
java.lang.Object
net.minecraft.client.gui.screens.inventory.tooltip.ClientBundleTooltip
- All Implemented Interfaces:
ClientTooltipComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Component
private static final Component
private static final Component
private final BundleContents
private static final int
private static final int
private static final ResourceLocation
private static final int
private static final ResourceLocation
private static final ResourceLocation
private static final int
private static final int
private static final int
private static final ResourceLocation
private static final ResourceLocation
private static final ResourceLocation
private static final int
private static final int
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate int
private static void
drawEmptyBundleDescriptionText
(int pX, int pY, Font pFont, GuiGraphics pGuiGraphics) private void
drawProgressbar
(int pX, int pY, Font pFont, GuiGraphics pGuiGraphics) private void
drawSelectedItemTooltip
(Font pFont, GuiGraphics pGuiGraphics, int pX, int pY, int pWidth) private int
getAmountOfHiddenItems
(List<ItemStack> pShownItems) private int
getContentXOffset
(int pWidth) private static int
private static int
int
private int
private Component
private ResourceLocation
getShownItems
(int pItemsToShow) int
private int
private int
private void
renderBundleWithItemsTooltip
(Font pFont, int pX, int pY, int pWidth, int pHeight, GuiGraphics pGuiGraphics) private static void
renderCount
(int pSlotX, int pSlotY, int pCount, Font pFont, GuiGraphics pGuiGraphics) private void
renderEmptyBundleTooltip
(Font pFont, int pX, int pY, int pWidth, int pHeight, GuiGraphics pGuiGraphics) void
renderImage
(Font pFont, int pX, int pY, int pWidth, int pHeight, GuiGraphics pGuiGraphics) private void
renderSlot
(int pSlotIndex, int pX, int pY, List<ItemStack> pShownItems, int pSeed, Font pFont, GuiGraphics pGuiGraphics) private static boolean
shouldRenderItemSlot
(List<ItemStack> pShownItems, int pSlotIndex) private static boolean
shouldRenderSurplusText
(boolean pHasEnoughItems, int pCellX, int pCellY) boolean
private int
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.screens.inventory.tooltip.ClientTooltipComponent
renderText
-
Field Details
-
PROGRESSBAR_BORDER_SPRITE
-
PROGRESSBAR_FILL_SPRITE
-
PROGRESSBAR_FULL_SPRITE
-
SLOT_HIGHLIGHT_BACK_SPRITE
-
SLOT_HIGHLIGHT_FRONT_SPRITE
-
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
-
BUNDLE_EMPTY_TEXT
-
BUNDLE_EMPTY_DESCRIPTION
-
contents
-
-
Constructor Details
-
ClientBundleTooltip
-
-
Method Details
-
getHeight
- Specified by:
getHeight
in interfaceClientTooltipComponent
-
getWidth
- Specified by:
getWidth
in interfaceClientTooltipComponent
-
showTooltipWithItemInHand
public boolean showTooltipWithItemInHand()- Specified by:
showTooltipWithItemInHand
in interfaceClientTooltipComponent
-
getEmptyBundleBackgroundHeight
-
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 interfaceClientTooltipComponent
-
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
-
shouldRenderSurplusText
private static boolean shouldRenderSurplusText(boolean pHasEnoughItems, int pCellX, int pCellY) -
shouldRenderItemSlot
-
getAmountOfHiddenItems
-
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
-
drawEmptyBundleDescriptionText
private static void drawEmptyBundleDescriptionText(int pX, int pY, Font pFont, GuiGraphics pGuiGraphics) -
getEmptyBundleDescriptionTextHeight
-
getProgressBarFill
private int getProgressBarFill() -
getProgressBarTexture
-
getProgressBarFillText
-