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 voidextractBundleWithItemsTooltip(Font font, int x, int y, int w, int h, GuiGraphicsExtractor graphics, org.apache.commons.lang3.math.Fraction weight) private static voidextractCount(int drawX, int drawY, int hiddenItemCount, Font font, GuiGraphicsExtractor graphics) private static voidextractEmptyBundleDescriptionText(int x, int y, Font font, GuiGraphicsExtractor graphics) private static voidextractEmptyBundleTooltip(Font font, int x, int y, int w, int h, GuiGraphicsExtractor graphics) voidextractImage(Font font, int x, int y, int w, int h, GuiGraphicsExtractor graphics) private static voidextractProgressbar(int x, int y, Font font, GuiGraphicsExtractor graphics, org.apache.commons.lang3.math.Fraction weight) private voidextractSelectedItemTooltip(Font font, GuiGraphicsExtractor graphics, int x, int y, int w) private voidextractSlot(int slotNumber, int drawX, int drawY, List<ItemStackTemplate> shownItems, int slotIndex, Font font, GuiGraphicsExtractor graphics) 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 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
extractText
-
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() -
extractImage
- Specified by:
extractImagein interfaceClientTooltipComponent
-
extractEmptyBundleTooltip
private static void extractEmptyBundleTooltip(Font font, int x, int y, int w, int h, GuiGraphicsExtractor graphics) -
extractBundleWithItemsTooltip
private void extractBundleWithItemsTooltip(Font font, int x, int y, int w, int h, GuiGraphicsExtractor 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
-
extractSlot
private void extractSlot(int slotNumber, int drawX, int drawY, List<ItemStackTemplate> shownItems, int slotIndex, Font font, GuiGraphicsExtractor graphics) -
extractCount
private static void extractCount(int drawX, int drawY, int hiddenItemCount, Font font, GuiGraphicsExtractor graphics) -
extractSelectedItemTooltip
private void extractSelectedItemTooltip(Font font, GuiGraphicsExtractor graphics, int x, int y, int w) -
extractProgressbar
private static void extractProgressbar(int x, int y, Font font, GuiGraphicsExtractor graphics, org.apache.commons.lang3.math.Fraction weight) -
extractEmptyBundleDescriptionText
private static void extractEmptyBundleDescriptionText(int x, int y, Font font, GuiGraphicsExtractor graphics) -
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)
-