Class ContainerObjectSelectionList.Entry<E extends ContainerObjectSelectionList.Entry<E>>
java.lang.Object
net.minecraft.client.gui.components.AbstractSelectionList.Entry<E>
net.minecraft.client.gui.components.ContainerObjectSelectionList.Entry<E>
- All Implemented Interfaces:
ContainerEventHandler
,GuiEventListener
,TabOrderedElement
- Direct Known Subclasses:
EditGameRulesScreen.RuleEntry
,KeyBindsList.Entry
,OptionsList.Entry
,PlayerEntry
,RealmsBackupScreen.Entry
,RealmsPlayerScreen.Entry
,ScrollableExperimentsScreen.ExperimentSelectionList.ExperimentEntry
,ServerLinksScreen.LinkListEntry
- Enclosing class:
ContainerObjectSelectionList<E extends ContainerObjectSelectionList.Entry<E>>
public abstract static class ContainerObjectSelectionList.Entry<E extends ContainerObjectSelectionList.Entry<E>>
extends AbstractSelectionList.Entry<E>
implements ContainerEventHandler
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate boolean
private GuiEventListener
private NarratableEntry
Fields inherited from class net.minecraft.client.gui.components.AbstractSelectionList.Entry
list
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfocusPathAtIndex
(FocusNavigationEvent pEvent, int pIndex) boolean
boolean
mouseClicked
(double pMouseX, double pMouseY, int pButton) Called when a mouse button is clicked within the GUI element.abstract List
<? extends NarratableEntry> nextFocusPath
(FocusNavigationEvent pEvent) Retrieves the next focus path based on the given focus navigation event.void
setDragging
(boolean pDragging) Sets if the GUI element is dragging or not.void
setFocused
(GuiEventListener pListener) Sets the focus state of the GUI element.(package private) void
updateNarration
(NarrationElementOutput pNarrationElementOutput) Methods inherited from class net.minecraft.client.gui.components.AbstractSelectionList.Entry
isFocused, isMouseOver, render, renderBack, setFocused
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, children, getChildAt, getCurrentFocusPath, isFocused, keyPressed, keyReleased, mouseDragged, mouseReleased, mouseScrolled, setFocused
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
getRectangle, isMouseOver, mouseMoved
Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
focused
-
lastNarratable
-
dragging
private boolean dragging
-
-
Constructor Details
-
Entry
public Entry()
-
-
Method Details
-
isDragging
public boolean isDragging()- Specified by:
isDragging
in interfaceContainerEventHandler
-
setDragging
public void setDragging(boolean pDragging) Sets if the GUI element is dragging or not.- Specified by:
setDragging
in interfaceContainerEventHandler
- Parameters:
pDragging
- the dragging state of the GUI element.
-
mouseClicked
public boolean mouseClicked(double pMouseX, double pMouseY, int pButton) Called when a mouse button is clicked within the GUI element.- Specified by:
mouseClicked
in interfaceContainerEventHandler
- Specified by:
mouseClicked
in interfaceGuiEventListener
- Parameters:
pMouseX
- the X coordinate of the mouse.pMouseY
- the Y coordinate of the mouse.pButton
- the button that was clicked.- Returns:
true
if the event is consumed,false
otherwise.
-
setFocused
Sets the focus state of the GUI element.- Specified by:
setFocused
in interfaceContainerEventHandler
- Parameters:
pListener
- the focused GUI element.
-
getFocused
- Specified by:
getFocused
in interfaceContainerEventHandler
-
narratables
-
updateNarration
-