@Environment(value=CLIENT) public final class WorldListWidget.Entry extends AlwaysSelectedEntryListWidget.Entry<WorldListWidget.Entry> implements AutoCloseable
Modifier and Type | Field and Description |
---|---|
private MinecraftClient |
client |
private NativeImageBackedTexture |
icon |
private File |
iconFile |
private Identifier |
iconLocation |
private LevelSummary |
level |
private SelectWorldScreen |
screen |
private long |
time |
Constructor and Description |
---|
Entry(WorldListWidget levelList,
LevelSummary level) |
Modifier and Type | Method and 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() |
changeFocus
isMouseOver
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
charTyped, keyPressed, keyReleased, mouseDragged, mouseMoved, mouseReleased, mouseScrolled
private final MinecraftClient client
private final SelectWorldScreen screen
private final LevelSummary level
private final Identifier iconLocation
private File iconFile
@Nullable private final NativeImageBackedTexture icon
private long time
public Entry(WorldListWidget levelList, LevelSummary level)
public void render(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta)
render
in class EntryListWidget.Entry<WorldListWidget.Entry>
public boolean mouseClicked(double mouseX, double mouseY, int button)
GLFW
class.mouseClicked
in interface Element
mouseX
- the X coordinate of the mousemouseY
- the Y coordinate of the mousebutton
- the mouse button numbertrue
to indicate that the event handling is successful/validMouse.onMouseButton(long, int, int, int)
,
GLFW.GLFW_MOUSE_BUTTON_1
public void play()
public void delete()
public void edit()
public void recreate()
private void start()
private void method_29990()
@Nullable private NativeImageBackedTexture getIconTexture()
public void close()
close
in interface AutoCloseable