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,IAbstractWidgetExtension
- Direct Known Subclasses:
ContainerObjectSelectionList,ObjectSelectionList
public abstract class AbstractSelectionList<E extends AbstractSelectionList.Entry<E>>
extends AbstractContainerWidget
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected static class(package private) classNested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected intprivate Eprivate static final ResourceLocationprotected final intprivate static final ResourceLocationprotected final Minecraftprivate booleanprivate doubleprotected static final intprivate static final ResourceLocationprivate static final ResourceLocationprivate booleanprivate EFields inherited from class net.minecraft.client.gui.components.AbstractWidget
active, alpha, height, isHovered, packedFGColor, UNSET_FG_COLOR, visible, widthFields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS -
Constructor Summary
ConstructorsConstructorDescriptionAbstractSelectionList(Minecraft p_93404_, int p_93405_, int p_93406_, int p_93407_, int p_93408_) -
Method Summary
Modifier and TypeMethodDescriptionprotected intprotected voidaddEntryToTop(E p_239858_) (package private) voidbindEntryToSelf(AbstractSelectionList.Entry<E> p_93506_) protected voidcenterScrollOn(E p_93495_) children()protected voidprotected booleanclickedHeader(int p_93431_, int p_93432_) protected voidenableScissor(GuiGraphics p_282811_) protected voidensureVisible(E p_93499_) protected intprotected EgetEntry(int p_93501_) protected final EgetEntryAtPosition(double p_93413_, double p_93414_) protected Eprotected intprivate intprotected intintprivate intprivate intprotected intgetRowBottom(int p_93486_) intintprotected intgetRowTop(int p_93512_) intdoubleprotected intbooleanisMouseOver(double p_93479_, double p_93480_) protected booleanisSelectedItem(int p_93504_) protected booleanisValidMouseClick(int p_301202_) booleanmouseClicked(double p_93420_, double p_93421_, int p_93422_) booleanmouseDragged(double p_93424_, double p_93425_, int p_93426_, double p_93427_, double p_93428_) booleanmouseReleased(double p_93491_, double p_93492_, int p_93493_) booleanmouseScrolled(double p_93416_, double p_93417_, double p_93418_, double p_294369_) protected voidnarrateListElementPosition(NarrationElementOutput p_168791_, E p_168792_) protected EnextEntry(ScreenDirection p_265160_) protected EnextEntry(ScreenDirection p_265210_, Predicate<E> p_265604_) protected EnextEntry(ScreenDirection p_265159_, Predicate<E> p_265109_, E p_265379_) protected Eremove(int p_93515_) protected booleanremoveEntry(E p_93503_) protected booleanremoveEntryFromTop(E p_239046_) protected voidrenderDecorations(GuiGraphics p_281477_, int p_93459_, int p_93460_) protected voidrenderHeader(GuiGraphics p_282337_, int p_93444_, int p_93445_) protected voidrenderItem(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 voidrenderListBackground(GuiGraphics p_331297_) protected voidrenderListItems(GuiGraphics p_282079_, int p_239229_, int p_239230_, float p_239231_) protected voidrenderListSeparators(GuiGraphics p_331248_) protected voidrenderSelection(GuiGraphics p_283589_, int p_240142_, int p_240143_, int p_240144_, int p_240145_, int p_240146_) voidrenderWidget(GuiGraphics p_282708_, int p_283242_, int p_282891_, float p_283683_) protected voidreplaceEntries(Collection<E> p_93470_) private voidscroll(int p_93430_) protected booleanvoidsetFocused(GuiEventListener p_265738_) protected voidsetRenderHeader(boolean p_93474_, int p_93475_) voidsetScrollAmount(double p_93411_) voidsetSelected(E p_93462_) protected voidupdateScrollingState(double p_93482_, double p_93483_, int p_93484_) voidupdateSize(int p_331980_, HeaderAndFooterLayout p_331821_) voidupdateSizeAndPosition(int p_332028_, int p_330750_, int p_331681_) Methods inherited from class net.minecraft.client.gui.components.AbstractContainerWidget
isDragging, isFocused, nextFocusPath, setDragging, setFocusedMethods 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, wrapDefaultNarrationMessageMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.events.ContainerEventHandler
charTyped, getChildAt, getCurrentFocusPath, keyPressed, keyReleasedMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getRectangle, mouseMovedMethods inherited from interface net.neoforged.neoforge.client.extensions.IAbstractWidgetExtension
onClickMethods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
setPositionMethods 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:
getFocusedin interfaceContainerEventHandler- Overrides:
getFocusedin 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_332028_, int p_330750_, int p_331681_) -
getMaxPosition
protected int getMaxPosition() -
clickedHeader
protected boolean clickedHeader(int p_93431_, int p_93432_) -
renderHeader
-
renderDecorations
-
renderWidget
- Specified by:
renderWidgetin 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_301202_) -
mouseClicked
public boolean mouseClicked(double p_93420_, double p_93421_, int p_93422_) - Specified by:
mouseClickedin interfaceContainerEventHandler- Specified by:
mouseClickedin interfaceGuiEventListener- Overrides:
mouseClickedin classAbstractContainerWidget
-
mouseReleased
public boolean mouseReleased(double p_93491_, double p_93492_, int p_93493_) - Specified by:
mouseReleasedin interfaceContainerEventHandler- Specified by:
mouseReleasedin interfaceGuiEventListener- Overrides:
mouseReleasedin classAbstractContainerWidget
-
mouseDragged
public boolean mouseDragged(double p_93424_, double p_93425_, int p_93426_, double p_93427_, double p_93428_) - Specified by:
mouseDraggedin interfaceContainerEventHandler- Specified by:
mouseDraggedin interfaceGuiEventListener- Overrides:
mouseDraggedin classAbstractContainerWidget
-
mouseScrolled
public boolean mouseScrolled(double p_93416_, double p_93417_, double p_93418_, double p_294369_) -
setFocused
- Specified by:
setFocusedin interfaceContainerEventHandler- Overrides:
setFocusedin classAbstractContainerWidget
-
isMouseOver
public boolean isMouseOver(double p_93479_, double p_93480_) - Specified by:
isMouseOverin interfaceGuiEventListener- Overrides:
isMouseOverin 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:
narrationPriorityin interfaceNarratableEntry- Overrides:
narrationPriorityin classAbstractWidget
-
remove
-
removeEntry
-
getHovered
-
bindEntryToSelf
-
narrateListElementPosition
-