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
,Widget
,NarratableEntry
,NarrationSupplier
- Direct Known Subclasses:
ContainerObjectSelectionList
,ObjectSelectionList
public abstract class AbstractSelectionList<E extends AbstractSelectionList.Entry<E>>
extends AbstractContainerEventHandler
implements Widget, NarratableEntry
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
protected static enum
(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
protected int
private E
protected final int
protected final Minecraft
private boolean
private boolean
private boolean
private boolean
private double
private boolean
private E
protected int
protected int
protected int
protected int
protected int
Fields inherited from class net.minecraft.client.gui.GuiComponent
BACKGROUND_LOCATION, GUI_ICONS_LOCATION, STATS_ICON_LOCATION
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_, int p_93409_) -
Method Summary
Modifier and TypeMethodDescriptionprotected int
(package private) void
bindEntryToSelf
(AbstractSelectionList.Entry<E> p_93506_) protected void
centerScrollOn
(E p_93495_) children()
protected final void
protected void
clickedHeader
(int p_93431_, int p_93432_) protected void
ensureVisible
(E p_93499_) int
protected E
getEntry
(int p_93501_) protected final E
getEntryAtPosition
(double p_93413_, double p_93414_) int
protected E
protected int
int
getLeft()
protected int
int
int
getRight()
private int
getRowBottom
(int p_93486_) int
int
protected int
getRowTop
(int p_93512_) int
double
protected int
int
int
getTop()
int
getWidth()
protected boolean
boolean
isMouseOver
(double p_93479_, double p_93480_) protected boolean
isSelectedItem
(int p_93504_) boolean
keyPressed
(int p_93434_, int p_93435_, int p_93436_) 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_) protected void
protected void
moveSelection
(AbstractSelectionList.SelectionDirection p_93465_, Predicate<E> p_93466_) protected void
narrateListElementPosition
(NarrationElementOutput p_168791_, E p_168792_) protected void
protected E
remove
(int p_93515_) protected boolean
removeEntry
(E p_93503_) void
protected void
renderBackground
(PoseStack p_93442_) protected void
renderDecorations
(PoseStack p_93443_, int p_93444_, int p_93445_) protected void
renderHeader
(PoseStack p_93458_, int p_93459_, int p_93460_, Tesselator p_93461_) protected void
renderList
(PoseStack p_93452_, int p_93453_, int p_93454_, int p_93455_, int p_93456_, float p_93457_) protected void
replaceEntries
(Collection<E> p_93470_) private void
scroll
(int p_93430_) void
setLeftPos
(int p_93508_) void
setRenderBackground
(boolean p_93489_) protected void
setRenderHeader
(boolean p_93474_, int p_93475_) void
setRenderSelection
(boolean p_93472_) void
setRenderTopAndBottom
(boolean p_93497_) 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_93438_, int p_93439_, int p_93440_, int p_93441_) Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
isDragging, setDragging, setFocused
Methods inherited from class net.minecraft.client.gui.GuiComponent
blit, blit, blit, blit, blit, blitOutlineBlack, drawCenteredString, drawCenteredString, drawCenteredString, drawString, drawString, drawString, fill, fillGradient, fillGradient, fillGradient, getBlitOffset, hLine, setBlitOffset, vLine
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
changeFocus, charTyped, getChildAt, keyReleased, magicalSpecialHackyFocus, setInitialFocus
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
Methods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
isActive
Methods 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:
getFocused
in interfaceContainerEventHandler
- Overrides:
getFocused
in classAbstractContainerEventHandler
-
children
- Specified by:
children
in interfaceContainerEventHandler
-
clearEntries
protected final void clearEntries() -
replaceEntries
-
getEntry
-
addEntry
-
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
-
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:
mouseClicked
in interfaceContainerEventHandler
- Specified by:
mouseClicked
in interfaceGuiEventListener
-
mouseReleased
public boolean mouseReleased(double p_93491_, double p_93492_, int p_93493_) - Specified by:
mouseReleased
in interfaceContainerEventHandler
- Specified by:
mouseReleased
in interfaceGuiEventListener
-
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
-
mouseScrolled
public boolean mouseScrolled(double p_93416_, double p_93417_, double p_93418_) - Specified by:
mouseScrolled
in interfaceContainerEventHandler
- Specified by:
mouseScrolled
in interfaceGuiEventListener
-
keyPressed
public boolean keyPressed(int p_93434_, int p_93435_, int p_93436_) - Specified by:
keyPressed
in interfaceContainerEventHandler
- Specified by:
keyPressed
in interfaceGuiEventListener
-
moveSelection
-
refreshSelection
protected void refreshSelection() -
moveSelection
protected void moveSelection(AbstractSelectionList.SelectionDirection p_93465_, Predicate<E> p_93466_) -
isMouseOver
public boolean isMouseOver(double p_93479_, double p_93480_) - Specified by:
isMouseOver
in interfaceGuiEventListener
-
renderList
protected void renderList(PoseStack p_93452_, int p_93453_, int p_93454_, int p_93455_, int p_93456_, float p_93457_) -
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:
narrationPriority
in 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()
-