Class SearchableResourceLocationSelectionList
java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.components.AbstractSelectionList<SearchableResourceLocationSelectionList.Entry>
com.pixelmonmod.pixelmon.client.gui.npc.widget.SearchableResourceLocationSelectionList
- All Implemented Interfaces:
net.minecraft.client.gui.components.events.ContainerEventHandler
,net.minecraft.client.gui.components.events.GuiEventListener
,net.minecraft.client.gui.components.Renderable
,net.minecraft.client.gui.components.TabOrderedElement
,net.minecraft.client.gui.layouts.LayoutElement
,net.minecraft.client.gui.narration.NarratableEntry
,net.minecraft.client.gui.narration.NarrationSupplier
public class SearchableResourceLocationSelectionList
extends net.minecraft.client.gui.components.AbstractSelectionList<SearchableResourceLocationSelectionList.Entry>
implements net.minecraft.client.gui.layouts.LayoutElement
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.narration.NarratableEntry
net.minecraft.client.gui.narration.NarratableEntry.NarrationPriority
-
Field Summary
Modifier and TypeFieldDescriptionprotected final net.minecraft.client.gui.components.EditBox
Fields inherited from class net.minecraft.client.gui.components.AbstractSelectionList
centerListVertically, children, headerHeight, height, hovered, itemHeight, minecraft, renderBackground, renderHeader, scrollAmount, SCROLLBAR_WIDTH, SCROLLER_SPRITE, scrolling, selected, width, x0, x1, y0, y1
Fields inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
DOUBLE_CLICK_THRESHOLD_MS
-
Constructor Summary
ConstructorDescriptionSearchableResourceLocationSelectionList
(int width, int height, int y0, int y1, int itemHeight) If the elements cannot be fit between the topScrollY and the bottomScrollY positions then the scroll bar will be rendered -
Method Summary
Modifier and TypeMethodDescriptionint
addEntry
(net.minecraft.resources.ResourceLocation resourceLocation) boolean
charTyped
(char p_94683_, int p_94684_) int
int
protected int
int
getX()
int
getY()
boolean
keyPressed
(int p_94710_, int p_94711_, int p_94712_) boolean
keyReleased
(int p_94715_, int p_94716_, int p_94717_) boolean
mouseClicked
(double mouseX, double mouseY, int button) protected void
renderDecorations
(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) protected void
renderList
(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) protected void
renderSelection
(net.minecraft.client.gui.GuiGraphics graphics, int topY, int p_240143_, int height, int p_240145_, int p_240146_) void
setLeftPos
(int leftPos) void
setX
(int p_265236_) void
setY
(int p_265404_) void
updateNarration
(net.minecraft.client.gui.narration.NarrationElementOutput p_169152_) void
visitWidgets
(Consumer<net.minecraft.client.gui.components.AbstractWidget> p_265082_) Methods inherited from class net.minecraft.client.gui.components.AbstractSelectionList
addEntry, addEntryToTop, centerScrollOn, children, clearEntries, clickedHeader, enableScissor, ensureVisible, getBottom, getEntry, getEntryAtPosition, getFirstElement, getFocused, getHeight, getHovered, getItemCount, getLeft, getMaxPosition, getMaxScroll, getRectangle, getRight, getRowBottom, getRowRight, getRowTop, getScrollAmount, getScrollBottom, getSelected, getTop, getWidth, isMouseOver, isSelectedItem, isValidMouseClick, mouseDragged, mouseReleased, mouseScrolled, narrateListElementPosition, narrationPriority, nextEntry, nextEntry, nextEntry, remove, removeEntry, removeEntryFromTop, render, renderHeader, renderItem, replaceEntries, setFocused, setRenderBackground, setRenderHeader, setScrollAmount, setSelected, updateScrollingState, updateSize
Methods inherited from class net.minecraft.client.gui.components.events.AbstractContainerEventHandler
isDragging, setDragging
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
getChildAt, getCurrentFocusPath, isFocused, magicalSpecialHackyFocus, nextFocusPath, setFocused
Methods inherited from interface net.minecraft.client.gui.components.events.GuiEventListener
mouseMoved
Methods inherited from interface net.minecraft.client.gui.layouts.LayoutElement
getHeight, getRectangle, getWidth, setPosition
Methods inherited from interface net.minecraft.client.gui.narration.NarratableEntry
isActive
Methods inherited from interface net.minecraft.client.gui.components.TabOrderedElement
getTabOrderGroup
-
Field Details
-
editBox
protected final net.minecraft.client.gui.components.EditBox editBox
-
-
Constructor Details
-
SearchableResourceLocationSelectionList
public SearchableResourceLocationSelectionList(int width, int height, int y0, int y1, int itemHeight) If the elements cannot be fit between the topScrollY and the bottomScrollY positions then the scroll bar will be rendered- Parameters:
width
-height
-y0
-y1
-itemHeight
-
-
-
Method Details
-
updateNarration
public void updateNarration(net.minecraft.client.gui.narration.NarrationElementOutput p_169152_) - Specified by:
updateNarration
in interfacenet.minecraft.client.gui.narration.NarrationSupplier
-
setX
public void setX(int p_265236_) - Specified by:
setX
in interfacenet.minecraft.client.gui.layouts.LayoutElement
-
setY
public void setY(int p_265404_) - Specified by:
setY
in interfacenet.minecraft.client.gui.layouts.LayoutElement
-
getX
public int getX()- Specified by:
getX
in interfacenet.minecraft.client.gui.layouts.LayoutElement
-
getY
public int getY()- Specified by:
getY
in interfacenet.minecraft.client.gui.layouts.LayoutElement
-
visitWidgets
- Specified by:
visitWidgets
in interfacenet.minecraft.client.gui.layouts.LayoutElement
-
mouseClicked
public boolean mouseClicked(double mouseX, double mouseY, int button) - Specified by:
mouseClicked
in interfacenet.minecraft.client.gui.components.events.ContainerEventHandler
- Specified by:
mouseClicked
in interfacenet.minecraft.client.gui.components.events.GuiEventListener
- Overrides:
mouseClicked
in classnet.minecraft.client.gui.components.AbstractSelectionList<SearchableResourceLocationSelectionList.Entry>
-
keyPressed
public boolean keyPressed(int p_94710_, int p_94711_, int p_94712_) - Specified by:
keyPressed
in interfacenet.minecraft.client.gui.components.events.ContainerEventHandler
- Specified by:
keyPressed
in interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
keyReleased
public boolean keyReleased(int p_94715_, int p_94716_, int p_94717_) - Specified by:
keyReleased
in interfacenet.minecraft.client.gui.components.events.ContainerEventHandler
- Specified by:
keyReleased
in interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
charTyped
public boolean charTyped(char p_94683_, int p_94684_) - Specified by:
charTyped
in interfacenet.minecraft.client.gui.components.events.ContainerEventHandler
- Specified by:
charTyped
in interfacenet.minecraft.client.gui.components.events.GuiEventListener
-
setLeftPos
public void setLeftPos(int leftPos) - Overrides:
setLeftPos
in classnet.minecraft.client.gui.components.AbstractSelectionList<SearchableResourceLocationSelectionList.Entry>
-
getRowLeft
public int getRowLeft()- Overrides:
getRowLeft
in classnet.minecraft.client.gui.components.AbstractSelectionList<SearchableResourceLocationSelectionList.Entry>
-
getRowWidth
public int getRowWidth()- Overrides:
getRowWidth
in classnet.minecraft.client.gui.components.AbstractSelectionList<SearchableResourceLocationSelectionList.Entry>
-
getScrollbarPosition
protected int getScrollbarPosition()- Overrides:
getScrollbarPosition
in classnet.minecraft.client.gui.components.AbstractSelectionList<SearchableResourceLocationSelectionList.Entry>
-
renderDecorations
protected void renderDecorations(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY) - Overrides:
renderDecorations
in classnet.minecraft.client.gui.components.AbstractSelectionList<SearchableResourceLocationSelectionList.Entry>
-
addEntry
public int addEntry(net.minecraft.resources.ResourceLocation resourceLocation) -
renderList
protected void renderList(net.minecraft.client.gui.GuiGraphics graphics, int mouseX, int mouseY, float partialTicks) - Overrides:
renderList
in classnet.minecraft.client.gui.components.AbstractSelectionList<SearchableResourceLocationSelectionList.Entry>
-
renderSelection
protected void renderSelection(net.minecraft.client.gui.GuiGraphics graphics, int topY, int p_240143_, int height, int p_240145_, int p_240146_) - Overrides:
renderSelection
in classnet.minecraft.client.gui.components.AbstractSelectionList<SearchableResourceLocationSelectionList.Entry>
-