Class ClientBundleTooltip
java.lang.Object
net.minecraft.client.gui.screens.inventory.tooltip.ClientBundleTooltip
- All Implemented Interfaces:
ClientTooltipComponent
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Componentprivate static final Componentprivate static final Componentprivate final BundleContentsprivate static final intprivate static final intprivate static final ResourceLocationprivate static final intprivate static final ResourceLocationprivate static final ResourceLocationprivate static final intprivate static final intprivate static final intprivate static final ResourceLocationprivate static final ResourceLocationprivate static final ResourceLocationprivate static final intprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intprivate static voiddrawEmptyBundleDescriptionText(int x, int y, Font font, GuiGraphics guiGraphics) private voiddrawProgressbar(int x, int y, Font font, GuiGraphics guiGraphics) private voiddrawSelectedItemTooltip(Font font, GuiGraphics guiGraphics, int x, int y, int width) private intgetAmountOfHiddenItems(List<ItemStack> shownItems) private intgetContentXOffset(int width) private static intprivate static intintprivate intprivate Componentprivate ResourceLocationgetShownItems(int itemsToShow) intprivate intprivate intprivate voidrenderBundleWithItemsTooltip(Font font, int x, int y, int width, int height, GuiGraphics guiGraphics) private static voidrenderCount(int slotX, int slotY, int count, Font font, GuiGraphics guiGraphics) private voidrenderEmptyBundleTooltip(Font font, int x, int y, int width, int height, GuiGraphics guiGraphics) voidrenderImage(Font p_194042_, int p_194043_, int p_194044_, int p_368730_, int p_368543_, GuiGraphics p_282522_) private voidrenderSlot(int slotIndex, int x, int y, List<ItemStack> shownItems, int seed, Font font, GuiGraphics guiGraphics) private static booleanshouldRenderItemSlot(List<ItemStack> shownItems, int slotIndex) private static booleanshouldRenderSurplusText(boolean hasEnoughItems, int cellX, int cellY) booleanprivate intMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:
getHeightin interfaceClientTooltipComponent
-
getWidth
- Specified by:
getWidthin interfaceClientTooltipComponent
-
showTooltipWithItemInHand
public boolean showTooltipWithItemInHand()- Specified by:
showTooltipWithItemInHandin interfaceClientTooltipComponent
-
getEmptyBundleBackgroundHeight
-
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:
renderImagein interfaceClientTooltipComponent
-
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
-
shouldRenderSurplusText
private static boolean shouldRenderSurplusText(boolean hasEnoughItems, int cellX, int cellY) -
shouldRenderItemSlot
-
getAmountOfHiddenItems
-
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
-
drawProgressbar
-
drawEmptyBundleDescriptionText
private static void drawEmptyBundleDescriptionText(int x, int y, Font font, GuiGraphics guiGraphics) -
getEmptyBundleDescriptionTextHeight
-
getProgressBarFill
private int getProgressBarFill() -
getProgressBarTexture
-
getProgressBarFillText
-