Class AbstractSelectionList<E extends AbstractSelectionList.Entry<E>>
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.components.AbstractSelectionList<E>
- All Implemented Interfaces:
ContainerEventHandler,GuiEventListener,Renderable,TabOrderedElement,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 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 intprotected intprivate Eprotected final intprotected final Minecraftprivate booleanprivate booleanprivate booleanprivate booleanprivate doubleprivate booleanprivate Eprotected intprotected intprotected intprotected intprotected intFields 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 voidprotected voidclickedHeader(int p_93431_, int p_93432_) protected voidenableScissor(GuiGraphics p_282811_) protected voidensureVisible(E p_93499_) intprotected EgetEntry(int p_93501_) protected final EgetEntryAtPosition(double p_93413_, double p_93414_) intprotected Eprotected intintgetLeft()protected intintintgetRight()protected intgetRowBottom(int p_93486_) intintprotected intgetRowTop(int p_93512_) intdoubleprotected intintintgetTop()intgetWidth()booleanisMouseOver(double p_93479_, double p_93480_) protected booleanisSelectedItem(int p_93504_) 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 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_) voidrender(GuiGraphics p_282708_, int p_283242_, int p_282891_, float p_283683_) protected voidrenderBackground(GuiGraphics p_283512_) 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 voidrenderList(GuiGraphics p_282079_, int p_239229_, int p_239230_, float p_239231_) protected voidrenderSelection(GuiGraphics p_283589_, 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_) voidsetFocused(GuiEventListener p_265738_) 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, setDraggingMethods 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, isFocused, keyPressed, keyReleased, magicalSpecialHackyFocus, nextFocusPath, setFocusedMethods 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
updateNarrationMethods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
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
-
getFirstElement
-
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 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
-
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() -
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
-
setFocused
- Specified by:
setFocusedin interfaceContainerEventHandler- Overrides:
setFocusedin classAbstractContainerEventHandler
-
isMouseOver
public boolean isMouseOver(double p_93479_, double p_93480_) - Specified by:
isMouseOverin interfaceGuiEventListener
-
renderList
-
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() -
getRowRight
public int getRowRight() -
getRowTop
protected int getRowTop(int p_93512_) -
getRowBottom
protected int getRowBottom(int p_93486_) -
narrationPriority
- Specified by:
narrationPriorityin interfaceNarratableEntry
-
remove
-
removeEntry
-
getHovered
-
bindEntryToSelf
-
narrateListElementPosition
-
getRectangle
- Specified by:
getRectanglein interfaceGuiEventListener
-
getWidth
public int getWidth() -
getHeight
public int getHeight() -
getTop
public int getTop() -
getBottom
public int getBottom() -
getLeft
public int getLeft() -
getRight
public int getRight()
-