Class AbstractSelectionList<E extends AbstractSelectionList.Entry<E>>
java.lang.Object
net.minecraft.client.gui.components.AbstractWidget
net.minecraft.client.gui.components.AbstractContainerWidget
net.minecraft.client.gui.components.AbstractSelectionList<E>
- All Implemented Interfaces:
ContainerEventHandler
,GuiEventListener
,Renderable
,TabOrderedElement
,LayoutElement
,NarratableEntry
,NarrationSupplier
- Direct Known Subclasses:
ContainerObjectSelectionList
,ObjectSelectionList
public abstract class AbstractSelectionList<E extends AbstractSelectionList.Entry<E>>
extends AbstractContainerWidget
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static class
(package private) class
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority
-
Field Summary
Modifier and TypeFieldDescriptionprotected boolean
protected int
private E
private static final ResourceLocation
protected final int
private static final ResourceLocation
protected final Minecraft
private boolean
private double
protected static final int
private static final ResourceLocation
private static final ResourceLocation
private boolean
private E
Fields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, width
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorDescriptionAbstractSelectionList
(Minecraft p_93404_, int p_93405_, int p_93406_, int p_93407_, int p_93408_) -
Method Summary
Modifier and TypeMethodDescriptionprotected int
protected void
addEntryToTop
(E p_239858_) (package private) void
bindEntryToSelf
(AbstractSelectionList.Entry<E> p_93506_) protected void
centerScrollOn
(E p_93495_) children()
protected void
protected boolean
clickedHeader
(int p_93431_, int p_93432_) protected void
enableScissor
(GuiGraphics p_282811_) protected void
ensureVisible
(E p_93499_) protected int
protected E
getEntry
(int p_93501_) protected final E
getEntryAtPosition
(double p_93413_, double p_93414_) protected E
protected int
private int
protected int
int
private int
private int
protected int
getRowBottom
(int p_93486_) int
int
protected int
getRowTop
(int p_93512_) int
double
protected int
boolean
isMouseOver
(double p_93479_, double p_93480_) protected boolean
isSelectedItem
(int p_93504_) protected boolean
isValidMouseClick
(int p_299130_) boolean
mouseClicked
(double p_93420_, double p_93421_, int p_93422_) boolean
mouseDragged
(double p_93424_, double p_93425_, int p_93426_, double p_93427_, double p_93428_) boolean
mouseReleased
(double p_93491_, double p_93492_, int p_93493_) boolean
mouseScrolled
(double p_93416_, double p_93417_, double p_93418_, double p_298552_) protected void
narrateListElementPosition
(NarrationElementOutput p_168791_, E p_168792_) protected E
nextEntry
(ScreenDirection p_265160_) protected E
nextEntry
(ScreenDirection p_265210_, Predicate<E> p_265604_) protected E
nextEntry
(ScreenDirection p_265159_, Predicate<E> p_265109_, E p_265379_) protected E
remove
(int p_93515_) protected boolean
removeEntry
(E p_93503_) protected boolean
removeEntryFromTop
(E p_239046_) protected void
renderDecorations
(GuiGraphics p_281477_, int p_93459_, int p_93460_) protected void
renderHeader
(GuiGraphics p_282337_, int p_93444_, int p_93445_) protected void
renderItem
(GuiGraphics p_282205_, int p_238966_, int p_238967_, float p_238968_, int p_238969_, int p_238970_, int p_238971_, int p_238972_, int p_238973_) protected void
renderListBackground
(GuiGraphics p_333412_) protected void
renderListItems
(GuiGraphics p_282079_, int p_239229_, int p_239230_, float p_239231_) protected void
renderListSeparators
(GuiGraphics p_331270_) protected void
renderSelection
(GuiGraphics p_283589_, int p_240142_, int p_240143_, int p_240144_, int p_240145_, int p_240146_) void
renderWidget
(GuiGraphics p_282708_, int p_283242_, int p_282891_, float p_283683_) protected void
replaceEntries
(Collection<E> p_93470_) private void
scroll
(int p_93430_) protected boolean
void
setFocused
(GuiEventListener p_265738_) protected void
setRenderHeader
(boolean p_93474_, int p_93475_) void
setScrollAmount
(double p_93411_) void
setSelected
(E p_93462_) protected void
updateScrollingState
(double p_93482_, double p_93483_, int p_93484_) void
updateSize
(int p_336225_, HeaderAndFooterLayout p_331081_) void
updateSizeAndPosition
(int p_334988_, int p_333730_, int p_328806_) Methods inherited from class net.minecraft.client.gui.components.AbstractContainerWidget
isDragging, isFocused, nextFocusPath, setDragging, setFocused
Methods inherited from class net.minecraft.client.gui.components.AbstractWidget
clearFGColor, clicked, createNarrationMessage, defaultButtonNarrationText, getBottom, getFGColor, getHeight, getMessage, getRectangle, getRight, getTabOrderGroup, getTooltip, getWidth, getX, getY, isActive, isHovered, isHoveredOrFocused, isValidClickButton, onClick, onDrag, onRelease, playDownSound, render, renderScrollingString, renderScrollingString, renderScrollingString, setAlpha, setFGColor, setHeight, setMessage, setRectangle, setSize, setTabOrderGroup, setTooltip, setTooltipDelay, setWidth, setX, setY, updateNarration, updateWidgetNarration, visitWidgets, wrapDefaultNarrationMessage
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.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, keyPressed, keyReleased
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getRectangle, mouseMoved
Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPosition
Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
SCROLLBAR_WIDTH
protected static final int SCROLLBAR_WIDTH- See Also:
-
SCROLLER_SPRITE
-
SCROLLER_BACKGROUND_SPRITE
-
MENU_LIST_BACKGROUND
-
INWORLD_MENU_LIST_BACKGROUND
-
minecraft
-
itemHeight
protected final int itemHeight -
children
-
centerListVertically
protected boolean centerListVertically -
scrollAmount
private double scrollAmount -
renderHeader
private boolean renderHeader -
headerHeight
protected int headerHeight -
scrolling
private boolean scrolling -
selected
-
hovered
-
-
Constructor Details
-
AbstractSelectionList
public AbstractSelectionList(Minecraft p_93404_, int p_93405_, int p_93406_, int p_93407_, int p_93408_)
-
-
Method Details
-
setRenderHeader
protected void setRenderHeader(boolean p_93474_, int p_93475_) -
getRowWidth
public int getRowWidth() -
getSelected
-
setSelected
-
getFirstElement
-
getFocused
- Specified by:
getFocused
in interfaceContainerEventHandler
- Overrides:
getFocused
in classAbstractContainerWidget
-
children
-
clearEntries
protected void clearEntries() -
replaceEntries
-
getEntry
-
addEntry
-
addEntryToTop
-
removeEntryFromTop
-
getItemCount
protected int getItemCount() -
isSelectedItem
protected boolean isSelectedItem(int p_93504_) -
getEntryAtPosition
-
updateSizeAndPosition
public void updateSizeAndPosition(int p_334988_, int p_333730_, int p_328806_) -
getMaxPosition
protected int getMaxPosition() -
clickedHeader
protected boolean clickedHeader(int p_93431_, int p_93432_) -
renderHeader
-
renderDecorations
-
renderWidget
- Specified by:
renderWidget
in classAbstractWidget
-
scrollbarVisible
protected boolean scrollbarVisible() -
renderListSeparators
-
renderListBackground
-
enableScissor
-
centerScrollOn
-
ensureVisible
-
scroll
private void scroll(int p_93430_) -
getScrollAmount
public double getScrollAmount() -
setScrollAmount
public void setScrollAmount(double p_93411_) -
getMaxScroll
public int getMaxScroll() -
updateScrollingState
protected void updateScrollingState(double p_93482_, double p_93483_, int p_93484_) -
getScrollbarPosition
protected int getScrollbarPosition() -
getDefaultScrollbarPosition
protected int getDefaultScrollbarPosition() -
getListOutlinePadding
private int getListOutlinePadding() -
isValidMouseClick
protected boolean isValidMouseClick(int p_299130_) -
mouseClicked
public boolean mouseClicked(double p_93420_, double p_93421_, int p_93422_) - Specified by:
mouseClicked
in interfaceContainerEventHandler
- Specified by:
mouseClicked
in interfaceGuiEventListener
- Overrides:
mouseClicked
in classAbstractContainerWidget
-
mouseReleased
public boolean mouseReleased(double p_93491_, double p_93492_, int p_93493_) - Specified by:
mouseReleased
in interfaceContainerEventHandler
- Specified by:
mouseReleased
in interfaceGuiEventListener
- Overrides:
mouseReleased
in classAbstractContainerWidget
-
mouseDragged
public boolean mouseDragged(double p_93424_, double p_93425_, int p_93426_, double p_93427_, double p_93428_) - Specified by:
mouseDragged
in interfaceContainerEventHandler
- Specified by:
mouseDragged
in interfaceGuiEventListener
- Overrides:
mouseDragged
in classAbstractContainerWidget
-
mouseScrolled
public boolean mouseScrolled(double p_93416_, double p_93417_, double p_93418_, double p_298552_) -
setFocused
- Specified by:
setFocused
in interfaceContainerEventHandler
- Overrides:
setFocused
in classAbstractContainerWidget
-
isMouseOver
public boolean isMouseOver(double p_93479_, double p_93480_) - Specified by:
isMouseOver
in interfaceGuiEventListener
- Overrides:
isMouseOver
in classAbstractWidget
-
renderListItems
protected void renderListItems(GuiGraphics p_282079_, int p_239229_, int p_239230_, float p_239231_) -
renderItem
protected void renderItem(GuiGraphics p_282205_, int p_238966_, int p_238967_, float p_238968_, int p_238969_, int p_238970_, int p_238971_, int p_238972_, int p_238973_) -
renderSelection
protected void renderSelection(GuiGraphics p_283589_, int p_240142_, int p_240143_, int p_240144_, int p_240145_, int p_240146_) -
getRowLeft
public int getRowLeft() -
getRealRowLeft
private int getRealRowLeft() -
getRowRight
public int getRowRight() -
getRealRowRight
private int getRealRowRight() -
getRowTop
protected int getRowTop(int p_93512_) -
getRowBottom
protected int getRowBottom(int p_93486_) -
narrationPriority
- Specified by:
narrationPriority
in interfaceNarratableEntry
- Overrides:
narrationPriority
in classAbstractWidget
-
remove
-
removeEntry
-
getHovered
-
bindEntryToSelf
-
narrateListElementPosition
-