Class FriendToast
java.lang.Object
net.minecraft.client.gui.components.toasts.FriendToast
- All Implemented Interfaces:
Toast
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface Toast
Toast.Visibility -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final WidgetSpritesprivate static final longprivate final longprivate static final intprivate static final intprivate final List<FormattedCharSequence> private static final intprivate static final intprivate final @Nullable ResolvableProfileprivate static final intprivate static final intprivate Toast.VisibilityFields inherited from interface Toast
DEFAULT_WIDTH, NO_TOKEN, SLOT_HEIGHT -
Constructor Summary
ConstructorsConstructorDescriptionFriendToast(Font font, @Nullable ResolvableProfile skinProfile, Component message) FriendToast(Font font, @Nullable ResolvableProfile skinProfile, Component message, long displayTimeMs) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidadd(ToastManager toastManager, Font font, @Nullable ResolvableProfile skinProfile, Component message) private static voidadd(Minecraft minecraft, @Nullable ResolvableProfile skinProfile, Component message) private static voidaddWithSkin(Minecraft minecraft, UUID playerId, Component message) private intvoidextractRenderState(GuiGraphicsExtractor graphics, Font font, long fullyVisibleForMs) intheight()voidhide()static voidshowFriendAdded(Minecraft minecraft, String nickname, UUID playerId) static voidshowFriendRequestAccepted(Minecraft minecraft, String nickname, UUID playerId) static voidshowFriendRequestReceived(Minecraft minecraft, String nickname, UUID playerId) static voidshowFriendRequestSent(Minecraft minecraft, String nickname) voidupdate(ToastManager manager, long fullyVisibleForMs) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Toast
getSoundEvent, getToken, occcupiedSlotCount, onFinishedRendering, width, xPos, yPos
-
Field Details
-
BACKGROUND_SPRITE
-
FACE_SIZE
private static final int FACE_SIZE- See Also:
-
TEXT_LEFT_WITH_FACE
private static final int TEXT_LEFT_WITH_FACE- See Also:
-
TEXT_LEFT_NO_FACE
private static final int TEXT_LEFT_NO_FACE- See Also:
-
PADDING_TOP
private static final int PADDING_TOP- See Also:
-
PADDING_BOTTOM
private static final int PADDING_BOTTOM- See Also:
-
LINE_SPACING
private static final int LINE_SPACING- See Also:
-
DEFAULT_DISPLAY_TIME_MS
private static final long DEFAULT_DISPLAY_TIME_MS- See Also:
-
skinProfile
-
messageLines
-
displayTimeMs
private final long displayTimeMs -
visibility
-
-
Constructor Details
-
FriendToast
-
FriendToast
public FriendToast(Font font, @Nullable ResolvableProfile skinProfile, Component message, long displayTimeMs)
-
-
Method Details
-
getWantedVisibility
- Specified by:
getWantedVisibilityin interfaceToast
-
update
-
height
-
contentHeight
private int contentHeight() -
extractRenderState
- Specified by:
extractRenderStatein interfaceToast
-
hide
public void hide() -
add
public static void add(ToastManager toastManager, Font font, @Nullable ResolvableProfile skinProfile, Component message) -
add
private static void add(Minecraft minecraft, @Nullable ResolvableProfile skinProfile, Component message) -
addWithSkin
-
showFriendRequestSent
-
showFriendRequestReceived
-
showFriendRequestAccepted
-
showFriendAdded
-