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 MinecraftClientclientprivate NativeImageBackedTextureiconprivate IdentifiericonTextureIdprivate StringiconUriprivate MultiplayerScreenscreenprivate ServerInfoserverprivate longtime -
Constructor Summary
Constructors Modifier Constructor Description protectedServerEntry(MultiplayerScreen screen, ServerInfo server) -
Method Summary
Modifier and Type Method Description protected voiddraw(MatrixStack matrixStack, int int2, int int3, Identifier identifier)ServerInfogetServer()booleankeyPressed(int keyCode, int scanCode, int modifiers)Callback for when a key down event has been captured.private booleanmethod_20136()voidmethod_29978()private booleanmethod_29979(String string)booleanmouseClicked(double mouseX, double mouseY, int button)Callback for when a mouse button down event has been captured.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 voidswapEntries(int i, int j)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, 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)Renders an entry in a list.- Specified by:
renderin classEntryListWidget.Entry<MultiplayerServerListWidget.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
-
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 inGLFWclass.- Parameters:
keyCode- the named key code of the event as described in theGLFWclassscanCode- the unique/platform-specific scan code of the keyboard inputmodifiers- a GLFW bitfield describing the modifier keys that are held down (see GLFW Modifier key flags)- Returns:
trueto 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 inGLFWclass.- 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
-
getServer
-