Package net.minecraft.client.gui.screen
Class StatsScreen.ItemStatsListWidget
java.lang.Object
net.minecraft.client.gui.DrawableHelper
net.minecraft.client.gui.AbstractParentElement
net.minecraft.client.gui.widget.EntryListWidget<E>
net.minecraft.client.gui.widget.AlwaysSelectedEntryListWidget<StatsScreen.ItemStatsListWidget.Entry>
net.minecraft.client.gui.screen.StatsScreen.ItemStatsListWidget
- All Implemented Interfaces:
Drawable
,Element
,ParentElement
- Enclosing class:
- StatsScreen
@Environment(CLIENT) class StatsScreen.ItemStatsListWidget extends AlwaysSelectedEntryListWidget<StatsScreen.ItemStatsListWidget.Entry>
-
Nested Class Summary
Nested Classes Modifier and Type Class Description (package private) class
StatsScreen.ItemStatsListWidget.Entry
(package private) class
StatsScreen.ItemStatsListWidget.ItemComparator
Nested classes/interfaces inherited from class net.minecraft.client.gui.widget.EntryListWidget
EntryListWidget.MoveDirection
-
Field Summary
Fields Modifier and Type Field Description protected List<StatType<Block>>
blockStatTypes
protected Comparator<Item>
comparator
protected int
field_18760
private int[]
HEADER_ICON_SPRITE_INDICES
protected List<Item>
items
protected List<StatType<Item>>
itemStatTypes
protected int
selectedHeaderColumn
protected StatType<?>
selectedStatType
Fields inherited from class net.minecraft.client.gui.widget.EntryListWidget
bottom, centerListVertically, client, headerHeight, height, itemHeight, left, right, top, width
Fields inherited from class net.minecraft.client.gui.DrawableHelper
GUI_ICONS_TEXTURE, OPTIONS_BACKGROUND_TEXTURE, STATS_ICON_TEXTURE
-
Constructor Summary
Constructors Constructor Description ItemStatsListWidget(MinecraftClient client)
-
Method Summary
Modifier and Type Method Description protected void
clickedHeader(int x, int y)
private int
getHeaderIndex(StatType<?> statType)
int
getRowWidth()
protected int
getScrollbarPositionX()
private StatType<?>
getStatType(int headerColumn)
protected Text
getText(Item item)
protected void
render(MatrixStack matrixStack, Text text, int int2, int int3)
protected void
renderBackground(MatrixStack matrices)
protected void
renderDecorations(MatrixStack matrixStack, int int2, int int3)
protected void
renderHeader(MatrixStack matrices, int x, int y, Tessellator tessellator)
protected void
selectStatType(StatType<?> statType)
Methods inherited from class net.minecraft.client.gui.widget.AlwaysSelectedEntryListWidget
changeFocus
Methods inherited from class net.minecraft.client.gui.widget.EntryListWidget
addEntry, centerScrollOn, children, clearEntries, ensureVisible, getEntry, getEntryAtPosition, getFocused, getItemCount, getMaxPosition, getMaxScroll, getRowLeft, getRowTop, getScrollAmount, getSelected, isFocused, isMouseOver, isSelectedItem, keyPressed, method_30015, method_31322, method_31323, method_31383, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, moveSelection, moveSelectionIf, remove, removeEntry, render, renderList, replaceEntries, setLeftPos, setRenderHeader, setRenderSelection, setScrollAmount, setSelected, updateScrollingState, updateSize
Methods inherited from class net.minecraft.client.gui.AbstractParentElement
isDragging, setDragging, setFocused
Methods inherited from class net.minecraft.client.gui.DrawableHelper
drawCenteredString, drawCenteredText, drawHorizontalLine, drawSprite, drawStringWithShadow, drawTexture, drawTexture, drawTexture, drawTexture, drawTextWithShadow, drawVerticalLine, fill, fillGradient, fillGradient, getZOffset, method_29343, setZOffset
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.Element
mouseMoved
Methods inherited from interface net.minecraft.client.gui.ParentElement
charTyped, focusOn, hoveredElement, keyReleased, setInitialFocus
-
Field Details
-
blockStatTypes
-
itemStatTypes
-
HEADER_ICON_SPRITE_INDICES
private final int[] HEADER_ICON_SPRITE_INDICES -
selectedHeaderColumn
protected int selectedHeaderColumn -
items
-
comparator
-
selectedStatType
-
field_18760
protected int field_18760
-
-
Constructor Details
-
ItemStatsListWidget
-
-
Method Details
-
renderHeader
- Overrides:
renderHeader
in classEntryListWidget<StatsScreen.ItemStatsListWidget.Entry>
-
getRowWidth
public int getRowWidth()- Overrides:
getRowWidth
in classEntryListWidget<StatsScreen.ItemStatsListWidget.Entry>
-
getScrollbarPositionX
protected int getScrollbarPositionX()- Overrides:
getScrollbarPositionX
in classEntryListWidget<StatsScreen.ItemStatsListWidget.Entry>
-
renderBackground
- Overrides:
renderBackground
in classEntryListWidget<StatsScreen.ItemStatsListWidget.Entry>
-
clickedHeader
protected void clickedHeader(int x, int y)- Overrides:
clickedHeader
in classEntryListWidget<StatsScreen.ItemStatsListWidget.Entry>
-
getStatType
-
getHeaderIndex
-
renderDecorations
- Overrides:
renderDecorations
in classEntryListWidget<StatsScreen.ItemStatsListWidget.Entry>
-
render
-
getText
-
selectStatType
-