类 AbstractSelectionList<E extends AbstractSelectionList.Entry<E>>

java.lang.Object
net.minecraft.client.gui.components.events.AbstractContainerEventHandler
net.minecraft.client.gui.components.AbstractSelectionList<E>
所有已实现的接口:
ContainerEventHandler, GuiEventListener, Renderable, TabOrderedElement, NarratableEntry, NarrationSupplier
直接已知子类:
ContainerObjectSelectionList, ObjectSelectionList

public abstract class AbstractSelectionList<E extends AbstractSelectionList.Entry<E>> extends AbstractContainerEventHandler implements Renderable, NarratableEntry
  • 字段详细资料

    • minecraft

      protected final Minecraft minecraft
    • itemHeight

      protected final int itemHeight
    • children

      private final List<E extends AbstractSelectionList.Entry<E>> 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

      @Nullable private E extends AbstractSelectionList.Entry<E> selected
    • renderBackground

      private boolean renderBackground
    • renderTopAndBottom

      private boolean renderTopAndBottom
    • hovered

      @Nullable private E extends AbstractSelectionList.Entry<E> hovered
  • 构造器详细资料

    • AbstractSelectionList

      public AbstractSelectionList(Minecraft pMinecraft, int pWidth, int pHeight, int pY0, int pY1, int pItemHeight)
  • 方法详细资料

    • setRenderSelection

      public void setRenderSelection(boolean pRenderSelection)
    • setRenderHeader

      protected void setRenderHeader(boolean pRenderHeader, int pHeaderHeight)
    • getRowWidth

      public int getRowWidth()
    • getSelected

      @Nullable public E getSelected()
    • setSelected

      public void setSelected(@Nullable E pSelected)
    • getFirstElement

      public E getFirstElement()
    • setRenderBackground

      public void setRenderBackground(boolean pRenderBackground)
    • setRenderTopAndBottom

      public void setRenderTopAndBottom(boolean pRenderTopAndButton)
    • getFocused

      @Nullable public E getFocused()
      指定者:
      getFocused 在接口中 ContainerEventHandler
      覆盖:
      getFocused 在类中 AbstractContainerEventHandler
    • children

      public final List<E> children()
      指定者:
      children 在接口中 ContainerEventHandler
    • clearEntries

      protected void clearEntries()
    • replaceEntries

      protected void replaceEntries(Collection<E> pEntries)
    • getEntry

      protected E getEntry(int pIndex)
    • addEntry

      protected int addEntry(E pEntry)
    • addEntryToTop

      protected void addEntryToTop(E pEntry)
    • removeEntryFromTop

      protected boolean removeEntryFromTop(E pEntry)
    • getItemCount

      protected int getItemCount()
    • isSelectedItem

      protected boolean isSelectedItem(int pIndex)
    • getEntryAtPosition

      @Nullable protected final E getEntryAtPosition(double pMouseX, double pMouseY)
    • updateSize

      public void updateSize(int pWidth, int pHeight, int pY0, int pY1)
    • setLeftPos

      public void setLeftPos(int pX0)
    • getMaxPosition

      protected int getMaxPosition()
    • clickedHeader

      protected void clickedHeader(int pMouseX, int pMouseY)
    • renderHeader

      protected void renderHeader(GuiGraphics pGuiGraphics, int pX, int pY)
    • renderBackground

      protected void renderBackground(GuiGraphics pGuiGraphics)
    • renderDecorations

      protected void renderDecorations(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY)
    • render

      public void render(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick)
      指定者:
      render 在接口中 Renderable
    • enableScissor

      protected void enableScissor(GuiGraphics pGuiGraphics)
    • centerScrollOn

      protected void centerScrollOn(E pEntry)
    • ensureVisible

      protected void ensureVisible(E pEntry)
    • scroll

      private void scroll(int pScroll)
    • getScrollAmount

      public double getScrollAmount()
    • setScrollAmount

      public void setScrollAmount(double pScroll)
    • getMaxScroll

      public int getMaxScroll()
    • getScrollBottom

      public int getScrollBottom()
    • updateScrollingState

      protected void updateScrollingState(double pMouseX, double pMouseY, int pButton)
    • getScrollbarPosition

      protected int getScrollbarPosition()
    • mouseClicked

      public boolean mouseClicked(double pMouseX, double pMouseY, int pButton)
      指定者:
      mouseClicked 在接口中 ContainerEventHandler
      指定者:
      mouseClicked 在接口中 GuiEventListener
    • mouseReleased

      public boolean mouseReleased(double pMouseX, double pMouseY, int pButton)
      指定者:
      mouseReleased 在接口中 ContainerEventHandler
      指定者:
      mouseReleased 在接口中 GuiEventListener
    • mouseDragged

      public boolean mouseDragged(double pMouseX, double pMouseY, int pButton, double pDragX, double pDragY)
      指定者:
      mouseDragged 在接口中 ContainerEventHandler
      指定者:
      mouseDragged 在接口中 GuiEventListener
    • mouseScrolled

      public boolean mouseScrolled(double pMouseX, double pMouseY, double pDelta)
      指定者:
      mouseScrolled 在接口中 ContainerEventHandler
      指定者:
      mouseScrolled 在接口中 GuiEventListener
    • setFocused

      public void setFocused(@Nullable GuiEventListener pListener)
      指定者:
      setFocused 在接口中 ContainerEventHandler
      覆盖:
      setFocused 在类中 AbstractContainerEventHandler
    • nextEntry

      @Nullable protected E nextEntry(ScreenDirection pDirection)
    • nextEntry

      @Nullable protected E nextEntry(ScreenDirection pDirection, Predicate<E> pPredicate)
    • nextEntry

      @Nullable protected E nextEntry(ScreenDirection pDirection, Predicate<E> pPredicate, @Nullable E p_265379_)
    • isMouseOver

      public boolean isMouseOver(double pMouseX, double pMouseY)
      指定者:
      isMouseOver 在接口中 GuiEventListener
    • renderList

      protected void renderList(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick)
    • renderItem

      protected void renderItem(GuiGraphics pGuiGraphics, int pMouseX, int pMouseY, float pPartialTick, int pIndex, int pLeft, int pTop, int pWidth, int pHeight)
    • renderSelection

      protected void renderSelection(GuiGraphics pGuiGraphics, int pTop, int pWidth, int pHeight, int pOuterColor, int pInnerColor)
    • getRowLeft

      public int getRowLeft()
    • getRowRight

      public int getRowRight()
    • getRowTop

      protected int getRowTop(int pIndex)
    • getRowBottom

      protected int getRowBottom(int pIndex)
    • narrationPriority

      public NarratableEntry.NarrationPriority narrationPriority()
      指定者:
      narrationPriority 在接口中 NarratableEntry
    • remove

      @Nullable protected E remove(int pIndex)
    • removeEntry

      protected boolean removeEntry(E pEntry)
    • getHovered

      @Nullable protected E getHovered()
    • bindEntryToSelf

      void bindEntryToSelf(AbstractSelectionList.Entry<E> pEntry)
    • narrateListElementPosition

      protected void narrateListElementPosition(NarrationElementOutput pNarrationElementOutput, E pEntry)
    • getRectangle

      public ScreenRectangle getRectangle()
      指定者:
      getRectangle 在接口中 GuiEventListener
    • getWidth

      public int getWidth()
    • getHeight

      public int getHeight()
    • getTop

      public int getTop()
    • getBottom

      public int getBottom()
    • getLeft

      public int getLeft()
    • getRight

      public int getRight()