Class AbstractSelectionList<E extends AbstractSelectionList.Entry<E>>
java.lang.Object
net.minecraft.client.gui.GuiComponent
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.components.AbstractSelectionList<E>
- All Implemented Interfaces:
ContainerEventHandler,GuiEventListener,Renderable,NarratableEntry,NarrationSupplier
- Direct Known Subclasses:
ContainerObjectSelectionList,ObjectSelectionList
public abstract class AbstractSelectionList<E extends AbstractSelectionList.Entry<E>>
extends AbstractContainerEventHandler
implements Renderable, NarratableEntry
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic classprotected static enum(package private) classNested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
NarratableEntry.NarrationPriority -
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected intprotected intprivate Eprotected final intprotected final Minecraftprivate booleanprivate booleanprivate booleanprivate booleanprivate doubleprivate booleanprivate Eprotected intprotected intprotected intprotected intprotected intFields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATIONFields 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_, int p_93409_) -
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 final voidprotected voidclickedHeader(int p_93431_, int p_93432_) protected voidensureVisible(E p_93499_) intprotected EgetEntry(int p_93501_) protected final EgetEntryAtPosition(double p_93413_, double p_93414_) intprotected Eprotected intintgetLeft()protected intintintgetRight()private intgetRowBottom(int p_93486_) intintprotected intgetRowTop(int p_93512_) intdoubleprotected intintintgetTop()intgetWidth()protected booleanbooleanisMouseOver(double p_93479_, double p_93480_) protected booleanisSelectedItem(int p_93504_) booleankeyPressed(int p_93434_, int p_93435_, int p_93436_) 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_) protected voidprotected booleanmoveSelection(AbstractSelectionList.SelectionDirection p_93465_, Predicate<E> p_93466_) protected voidnarrateListElementPosition(NarrationElementOutput p_168791_, E p_168792_) protected voidprotected Eremove(int p_93515_) protected booleanremoveEntry(E p_93503_) protected booleanremoveEntryFromTop(E p_239046_) voidprotected voidrenderBackground(PoseStack p_93442_) protected voidrenderDecorations(PoseStack p_93443_, int p_93444_, int p_93445_) protected voidrenderHeader(PoseStack p_93458_, int p_93459_, int p_93460_, Tesselator p_93461_) protected voidrenderItem(PoseStack p_238965_, 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 voidrenderList(PoseStack p_239228_, int p_239229_, int p_239230_, float p_239231_) protected voidrenderSelection(PoseStack p_240141_, int p_240142_, int p_240143_, int p_240144_, int p_240145_, int p_240146_) protected voidreplaceEntries(Collection<E> p_93470_) private voidscroll(int p_93430_) voidsetLeftPos(int p_93508_) voidsetRenderBackground(boolean p_93489_) protected voidsetRenderHeader(boolean p_93474_, int p_93475_) voidsetRenderSelection(boolean p_93472_) voidsetRenderTopAndBottom(boolean p_93497_) voidsetScrollAmount(double p_93411_) voidsetSelected(E p_93462_) protected voidupdateScrollingState(double p_93482_, double p_93483_, int p_93484_) voidupdateSize(int p_93438_, int p_93439_, int p_93440_, int p_93441_) Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
isDragging, setDragging, setFocusedMethods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, disableScissor, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, enableScissor, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLineMethods 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
changeFocus, charTyped, getChildAt, keyReleased, magicalSpecialHackyFocus, setInitialFocusMethods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMovedMethods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
isActiveMethods inherited from interface net.minecraft.client.gui.narration.NarrationSupplier
updateNarration
-
Field Details
-
minecraft
-
itemHeight
protected final int itemHeight -
children
-
width
protected int width -
height
protected int height -
y0
protected int y0 -
y1
protected int y1 -
x1
protected int x1 -
x0
protected int x0 -
centerListVertically
protected boolean centerListVertically -
scrollAmount
private double scrollAmount -
renderSelection
private boolean renderSelection -
renderHeader
private boolean renderHeader -
headerHeight
protected int headerHeight -
scrolling
private boolean scrolling -
selected
-
renderBackground
private boolean renderBackground -
renderTopAndBottom
private boolean renderTopAndBottom -
hovered
-
-
Constructor Details
-
AbstractSelectionList
public AbstractSelectionList(Minecraft p_93404_, int p_93405_, int p_93406_, int p_93407_, int p_93408_, int p_93409_)
-
-
Method Details
-
setRenderSelection
public void setRenderSelection(boolean p_93472_) -
setRenderHeader
protected void setRenderHeader(boolean p_93474_, int p_93475_) -
getRowWidth
public int getRowWidth() -
getSelected
-
setSelected
-
setRenderBackground
public void setRenderBackground(boolean p_93489_) -
setRenderTopAndBottom
public void setRenderTopAndBottom(boolean p_93497_) -
getFocused
- Specified by:
getFocusedin interfaceContainerEventHandler- Overrides:
getFocusedin classAbstractContainerEventHandler
-
children
- Specified by:
childrenin interfaceContainerEventHandler
-
clearEntries
protected final void clearEntries() -
replaceEntries
-
getEntry
-
addEntry
-
addEntryToTop
-
removeEntryFromTop
-
getItemCount
protected int getItemCount() -
isSelectedItem
protected boolean isSelectedItem(int p_93504_) -
getEntryAtPosition
-
updateSize
public void updateSize(int p_93438_, int p_93439_, int p_93440_, int p_93441_) -
setLeftPos
public void setLeftPos(int p_93508_) -
getMaxPosition
protected int getMaxPosition() -
clickedHeader
protected void clickedHeader(int p_93431_, int p_93432_) -
renderHeader
-
renderBackground
-
renderDecorations
-
render
- Specified by:
renderin interfaceRenderable
-
centerScrollOn
-
ensureVisible
-
scroll
private void scroll(int p_93430_) -
getScrollAmount
public double getScrollAmount() -
setScrollAmount
public void setScrollAmount(double p_93411_) -
getMaxScroll
public int getMaxScroll() -
getScrollBottom
public int getScrollBottom() -
updateScrollingState
protected void updateScrollingState(double p_93482_, double p_93483_, int p_93484_) -
getScrollbarPosition
protected int getScrollbarPosition() -
mouseClicked
public boolean mouseClicked(double p_93420_, double p_93421_, int p_93422_) - Specified by:
mouseClickedin interfaceContainerEventHandler- Specified by:
mouseClickedin interfaceGuiEventListener
-
mouseReleased
public boolean mouseReleased(double p_93491_, double p_93492_, int p_93493_) - Specified by:
mouseReleasedin interfaceContainerEventHandler- Specified by:
mouseReleasedin interfaceGuiEventListener
-
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
-
mouseScrolled
public boolean mouseScrolled(double p_93416_, double p_93417_, double p_93418_) - Specified by:
mouseScrolledin interfaceContainerEventHandler- Specified by:
mouseScrolledin interfaceGuiEventListener
-
keyPressed
public boolean keyPressed(int p_93434_, int p_93435_, int p_93436_) - Specified by:
keyPressedin interfaceContainerEventHandler- Specified by:
keyPressedin interfaceGuiEventListener
-
moveSelection
-
refreshSelection
protected void refreshSelection() -
moveSelection
protected boolean moveSelection(AbstractSelectionList.SelectionDirection p_93465_, Predicate<E> p_93466_) -
isMouseOver
public boolean isMouseOver(double p_93479_, double p_93480_) - Specified by:
isMouseOverin interfaceGuiEventListener
-
renderList
-
renderItem
protected void renderItem(PoseStack p_238965_, 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(PoseStack p_240141_, int p_240142_, int p_240143_, int p_240144_, int p_240145_, int p_240146_) -
getRowLeft
public int getRowLeft() -
getRowRight
public int getRowRight() -
getRowTop
protected int getRowTop(int p_93512_) -
getRowBottom
private int getRowBottom(int p_93486_) -
isFocused
protected boolean isFocused() -
narrationPriority
- Specified by:
narrationPriorityin interfaceNarratableEntry
-
remove
-
removeEntry
-
getHovered
-
bindEntryToSelf
-
narrateListElementPosition
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getTop
public int getTop() -
getBottom
public int getBottom() -
getLeft
public int getLeft() -
getRight
public int getRight()
-