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 MinecraftClientclientprivate NativeImageBackedTextureiconprivate FileiconFileprivate IdentifiericonLocationprivate LevelSummarylevelprivate SelectWorldScreenscreenprivate longtime -
Constructor Summary
Constructors Constructor Description Entry(WorldListWidget levelList, LevelSummary level) -
Method Summary
Modifier and Type Method Description voidclose()voiddelete()voidedit()private NativeImageBackedTexturegetIconTexture()private voidmethod_29990()booleanmouseClicked(double mouseX, double mouseY, int button)Callback for when a mouse button down event has been captured.voidplay()voidrecreate()voidrender(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.private voidstart()Methods inherited from class net.minecraft.client.gui.widget.AlwaysSelectedEntryListWidget.Entry
changeFocusMethods inherited from class net.minecraft.client.gui.widget.EntryListWidget.Entry
isMouseOverMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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)Renders an entry in a list.- Specified by:
renderin classEntryListWidget.Entry<WorldListWidget.Entry>- Parameters:
matrices- the matrix stack used for renderingindex- the index of the entryy- the Y coordinate of the entryx- the X coordinate of the entryentryWidth- the width of the entryentryHeight- the height of the entrymouseX- the X coordinate of the mousemouseY- the Y coordinate of the mousehovered- 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 inGLFWclass.- Specified by:
mouseClickedin interfaceElement- Parameters:
mouseX- the X coordinate of the mousemouseY- the Y coordinate of the mousebutton- the mouse button number- Returns:
trueto 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:
closein interfaceAutoCloseable
-