Class WorldListWidget.Entry

All Implemented Interfaces:
AutoCloseable, Element
Enclosing class:
WorldListWidget

@Environment(CLIENT)
public final class WorldListWidget.Entry
extends AlwaysSelectedEntryListWidget.Entry<WorldListWidget.Entry>
implements AutoCloseable
  • Field Details

  • Constructor Details

  • Method Details

    • render

      public void render​(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta)
      Renders an entry in a list.
      Specified by:
      render in class EntryListWidget.Entry<WorldListWidget.Entry>
      Parameters:
      matrices - the matrix stack used for rendering
      index - the index of the entry
      y - the Y coordinate of the entry
      x - the X coordinate of the entry
      entryWidth - the width of the entry
      entryHeight - the height of the entry
      mouseX - the X coordinate of the mouse
      mouseY - the Y coordinate of the mouse
      hovered - whether the mouse is hovering over the entry
    • mouseClicked

      public boolean mouseClicked​(double mouseX, double mouseY, int button)
      Callback for when a mouse button down event has been captured. The button number is identified by the constants in GLFW class.
      Specified by:
      mouseClicked in interface Element
      Parameters:
      mouseX - the X coordinate of the mouse
      mouseY - the Y coordinate of the mouse
      button - the mouse button number
      Returns:
      true to indicate that the event handling is successful/valid
      See Also:
      Mouse.onMouseButton(long, int, int, int), GLFW.GLFW_MOUSE_BUTTON_1
    • play

      public void play()
    • delete

      public void delete()
    • edit

      public void edit()
    • recreate

      public void recreate()
    • start

      private void start()
    • method_29990

      private void method_29990()
    • getIconTexture

      @Nullable private NativeImageBackedTexture getIconTexture()
    • close

      public void close()
      Specified by:
      close in interface AutoCloseable