Class WorldListWidget.Entry
java.lang.Object
net.minecraft.client.gui.widget.EntryListWidget.Entry<E>
net.minecraft.client.gui.widget.AlwaysSelectedEntryListWidget.Entry<WorldListWidget.Entry>
net.minecraft.client.gui.screen.world.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 Summary
Fields Modifier and Type Field Description private MinecraftClient
client
private NativeImageBackedTexture
icon
private File
iconFile
private Identifier
iconLocation
private LevelSummary
level
private SelectWorldScreen
screen
private long
time
-
Constructor Summary
Constructors Constructor Description Entry(WorldListWidget levelList, LevelSummary level)
-
Method Summary
Modifier and Type Method Description void
close()
void
delete()
void
edit()
private NativeImageBackedTexture
getIconTexture()
private void
method_29990()
boolean
mouseClicked(double mouseX, double mouseY, int button)
Callback for when a mouse button down event has been captured.void
play()
void
recreate()
void
render(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta)
private void
start()
Methods inherited from class net.minecraft.client.gui.widget.AlwaysSelectedEntryListWidget.Entry
changeFocus
Methods inherited from class net.minecraft.client.gui.widget.EntryListWidget.Entry
isMouseOver
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.Element
charTyped, keyPressed, keyReleased, mouseDragged, mouseMoved, mouseReleased, mouseScrolled
-
Field Details
-
client
-
screen
-
level
-
iconLocation
-
iconFile
-
icon
-
time
private long time
-
-
Constructor Details
-
Entry
-
-
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)- Specified by:
render
in classEntryListWidget.Entry<WorldListWidget.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 inGLFW
class.- Specified by:
mouseClicked
in interfaceElement
- Parameters:
mouseX
- the X coordinate of the mousemouseY
- the Y coordinate of the mousebutton
- 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
-
close
public void close()- Specified by:
close
in interfaceAutoCloseable
-