Class MultiplayerServerListWidget.ServerEntry
java.lang.Object
net.minecraft.client.gui.widget.EntryListWidget.Entry<E>
net.minecraft.client.gui.widget.AlwaysSelectedEntryListWidget.Entry<MultiplayerServerListWidget.Entry>
net.minecraft.client.gui.screen.multiplayer.MultiplayerServerListWidget.Entry
net.minecraft.client.gui.screen.multiplayer.MultiplayerServerListWidget.ServerEntry
- All Implemented Interfaces:
Element
- Enclosing class:
- MultiplayerServerListWidget
@Environment(CLIENT) public class MultiplayerServerListWidget.ServerEntry extends MultiplayerServerListWidget.Entry
-
Field Summary
Fields Modifier and Type Field Description private MinecraftClient
client
private NativeImageBackedTexture
icon
private Identifier
iconTextureId
private String
iconUri
private MultiplayerScreen
screen
private ServerInfo
server
private long
time
-
Constructor Summary
Constructors Modifier Constructor Description protected
ServerEntry(MultiplayerScreen screen, ServerInfo server)
-
Method Summary
Modifier and Type Method Description protected void
draw(MatrixStack matrixStack, int int2, int int3, Identifier identifier)
ServerInfo
getServer()
boolean
keyPressed(int keyCode, int scanCode, int modifiers)
Callback for when a key down event has been captured.private boolean
method_20136()
void
method_29978()
private boolean
method_29979(String string)
boolean
mouseClicked(double mouseX, double mouseY, int button)
Callback for when a mouse button down event has been captured.void
render(MatrixStack matrices, int index, int y, int x, int entryWidth, int entryHeight, int mouseX, int mouseY, boolean hovered, float tickDelta)
private void
swapEntries(int i, int j)
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, keyReleased, mouseDragged, mouseMoved, mouseReleased, mouseScrolled
-
Field Details
-
screen
-
client
-
server
-
iconTextureId
-
iconUri
-
icon
-
time
private long time
-
-
Constructor Details
-
ServerEntry
-
-
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<MultiplayerServerListWidget.Entry>
-
method_29978
public void method_29978() -
draw
-
method_20136
private boolean method_20136() -
method_29979
-
keyPressed
public boolean keyPressed(int keyCode, int scanCode, int modifiers)Callback for when a key down event has been captured. The key code is identified by the constants inGLFW
class.- Parameters:
keyCode
- the named key code of the event as described in theGLFW
classscanCode
- the unique/platform-specific scan code of the keyboard inputmodifiers
- a GLFW bitfield describing the modifier keys that are held down (see {@linkplain https://www.glfw.org/docs/3.3/group__mods.html GLFW Modifier key flags})- Returns:
true
to indicate that the event handling is successful/valid- See Also:
Keyboard.onKey(long, int, int, int, int)
,GLFW.GLFW_KEY_Q
,GLFWKeyCallbackI.invoke(long, int, int, int, int)
-
swapEntries
private void swapEntries(int i, int j) -
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.- 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
-
getServer
-