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 Identifierprivate static final intprivate static final Identifierprivate static final Identifierprivate static final intprivate static final intprivate static final intprivate static final Identifierprivate static final Identifierprivate static final Identifierprivate static final intprivate static final int -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate intprivate static voiddrawEmptyBundleDescriptionText(int x, int y, Font font, GuiGraphics graphics) private static voiddrawProgressbar(int x, int y, Font font, GuiGraphics graphics, org.apache.commons.lang3.math.Fraction weight) private voiddrawSelectedItemTooltip(Font font, GuiGraphics graphics, int x, int y, int w) private intgetAmountOfHiddenItems(List<ItemStackTemplate> shownItems) private static intgetContentXOffset(int tooltipWidth) private static intprivate static intintprivate static intgetProgressBarFill(org.apache.commons.lang3.math.Fraction weight) private static @Nullable ComponentgetProgressBarFillText(org.apache.commons.lang3.math.Fraction weight) private static IdentifiergetProgressBarTexture(org.apache.commons.lang3.math.Fraction weight) private List<ItemStackTemplate> getShownItems(int amountOfItemsToShow) intprivate intprivate intprivate voidrenderBundleWithItemsTooltip(Font font, int x, int y, int w, int h, GuiGraphics graphics, org.apache.commons.lang3.math.Fraction weight) private static voidrenderCount(int drawX, int drawY, int hiddenItemCount, Font font, GuiGraphics graphics) private static voidrenderEmptyBundleTooltip(Font font, int x, int y, int w, int h, GuiGraphics graphics) voidrenderImage(Font font, int x, int y, int w, int h, GuiGraphics graphics) private voidrenderSlot(int slotNumber, int drawX, int drawY, List<ItemStackTemplate> shownItems, int slotIndex, Font font, GuiGraphics graphics) private static booleanshouldRenderItemSlot(List<? extends ItemInstance> shownItems, int slotNumber) private static booleanshouldRenderSurplusText(boolean isOverflowing, int column, int row) booleanprivate intMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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 static int getContentXOffset(int tooltipWidth) -
gridSizeY
private int gridSizeY() -
slotCount
private int slotCount() -
renderImage
- Specified by:
renderImagein interfaceClientTooltipComponent
-
renderEmptyBundleTooltip
private static void renderEmptyBundleTooltip(Font font, int x, int y, int w, int h, GuiGraphics graphics) -
renderBundleWithItemsTooltip
private void renderBundleWithItemsTooltip(Font font, int x, int y, int w, int h, GuiGraphics graphics, org.apache.commons.lang3.math.Fraction weight) -
getShownItems
-
shouldRenderSurplusText
private static boolean shouldRenderSurplusText(boolean isOverflowing, int column, int row) -
shouldRenderItemSlot
private static boolean shouldRenderItemSlot(List<? extends ItemInstance> shownItems, int slotNumber) -
getAmountOfHiddenItems
-
renderSlot
private void renderSlot(int slotNumber, int drawX, int drawY, List<ItemStackTemplate> shownItems, int slotIndex, Font font, GuiGraphics graphics) -
renderCount
private static void renderCount(int drawX, int drawY, int hiddenItemCount, Font font, GuiGraphics graphics) -
drawSelectedItemTooltip
-
drawProgressbar
private static void drawProgressbar(int x, int y, Font font, GuiGraphics graphics, org.apache.commons.lang3.math.Fraction weight) -
drawEmptyBundleDescriptionText
-
getEmptyBundleDescriptionTextHeight
-
getProgressBarFill
private static int getProgressBarFill(org.apache.commons.lang3.math.Fraction weight) -
getProgressBarTexture
-
getProgressBarFillText
private static @Nullable Component getProgressBarFillText(org.apache.commons.lang3.math.Fraction weight)
-