Class SocialInteractionsPlayerListEntry
java.lang.Object
net.minecraft.client.gui.widget.EntryListWidget.Entry<E>
net.minecraft.client.gui.widget.ElementListWidget.Entry<SocialInteractionsPlayerListEntry>
net.minecraft.client.gui.screen.multiplayer.SocialInteractionsPlayerListEntry
- All Implemented Interfaces:
Element,ParentElement
@Environment(CLIENT) public class SocialInteractionsPlayerListEntry extends ElementListWidget.Entry<SocialInteractionsPlayerListEntry>
-
Field Summary
Fields Modifier and Type Field Description static intBLACK_COLORprivate static TextBLOCKED_OFFLINE_TEXTprivate static TextBLOCKED_TEXTprivate List<Element>buttonsprivate MinecraftClientclientstatic intDARK_GRAY_COLORstatic intGRAY_COLORprivate static TextHIDDEN_OFFLINE_TEXTprivate static TextHIDDEN_TEXTprivate ButtonWidgethideButtonprivate List<OrderedText>hideTooltipstatic intLIGHT_GRAY_COLORprivate Stringnameprivate booleanofflineprivate static TextOFFLINE_TEXTprivate ButtonWidgetshowButtonprivate List<OrderedText>showTooltipprivate Supplier<Identifier>skinTextureprivate floattimeCounterprivate UUIDuuidstatic intWHITE_COLOR -
Constructor Summary
Constructors Constructor Description SocialInteractionsPlayerListEntry(MinecraftClient client, SocialInteractionsScreen parent, UUID uuid, String name, Supplier<Identifier> skinTexture) -
Method Summary
Modifier and Type Method Description List<? extends Element>children()Gets a list of all child GUI elements.StringgetName()private MutableTextgetNarrationMessage(MutableText text)private TextgetStatusText()UUIDgetUuid()private voidonButtonClick(boolean showButtonVisible, Text chatMessage)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 static voidrenderTooltip(SocialInteractionsScreen screen, MatrixStack matrices, List<OrderedText> tooltip, int mouseX, int mouseY)voidsetOffline(boolean offline)Methods inherited from class net.minecraft.client.gui.widget.ElementListWidget.Entry
getFocused, isDragging, setDragging, setFocusedMethods 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
isMouseOver, mouseMovedMethods inherited from interface net.minecraft.client.gui.ParentElement
changeFocus, charTyped, focusOn, hoveredElement, keyPressed, keyReleased, mouseClicked, mouseDragged, mouseReleased, mouseScrolled, setInitialFocus
-
Field Details
-
HIDDEN_TEXT
-
BLOCKED_TEXT
-
OFFLINE_TEXT
-
HIDDEN_OFFLINE_TEXT
-
BLOCKED_OFFLINE_TEXT
-
BLACK_COLOR
public static final int BLACK_COLOR -
GRAY_COLOR
public static final int GRAY_COLOR -
DARK_GRAY_COLOR
public static final int DARK_GRAY_COLOR -
WHITE_COLOR
public static final int WHITE_COLOR -
LIGHT_GRAY_COLOR
public static final int LIGHT_GRAY_COLOR -
client
-
buttons
-
uuid
-
name
-
skinTexture
-
offline
private boolean offline -
hideButton
-
showButton
-
hideTooltip
-
showTooltip
-
timeCounter
private float timeCounter
-
-
Constructor Details
-
SocialInteractionsPlayerListEntry
public SocialInteractionsPlayerListEntry(MinecraftClient client, SocialInteractionsScreen parent, UUID uuid, String name, Supplier<Identifier> skinTexture)
-
-
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<SocialInteractionsPlayerListEntry>- 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
-
children
Gets a list of all child GUI elements. -
getName
-
getUuid
-
setOffline
public void setOffline(boolean offline) -
onButtonClick
-
getNarrationMessage
-
getStatusText
-
renderTooltip
private static void renderTooltip(SocialInteractionsScreen screen, MatrixStack matrices, List<OrderedText> tooltip, int mouseX, int mouseY)
-