Class SystemToast
java.lang.Object
net.minecraft.client.gui.components.toasts.SystemToast
- All Implemented Interfaces:
Toast
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface Toast
Toast.Visibility -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final Identifierprivate booleanprivate booleanprivate final SystemToast.SystemToastIdprivate longprivate static final intprivate static final intprivate static final intprivate List<FormattedCharSequence> private Componentprivate Toast.Visibilityprivate final intFields inherited from interface Toast
DEFAULT_WIDTH, NO_TOKEN, SLOT_HEIGHT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSystemToast(SystemToast.SystemToastId id, Component title, List<FormattedCharSequence> messageLines, int width) SystemToast(SystemToast.SystemToastId id, Component title, @Nullable Component message) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidadd(ToastManager toastManager, SystemToast.SystemToastId id, Component title, @Nullable Component message) static voidaddOrUpdate(ToastManager toastManager, SystemToast.SystemToastId id, Component title, @Nullable Component message) voidstatic voidforceHide(ToastManager toastManager, SystemToast.SystemToastId id) getToken()intheight()static SystemToastmultiline(Minecraft minecraft, SystemToast.SystemToastId id, Component title, Component message) private static ImmutableList<FormattedCharSequence> nullToEmpty(@Nullable Component message) static voidonChunkLoadFailure(Minecraft minecraft, ChunkPos pos) static voidonChunkSaveFailure(Minecraft minecraft, ChunkPos pos) static voidonFileDropFailure(Minecraft minecraft, int count) static voidonLowDiskSpace(Minecraft minecraft) static voidonPackCopyFailure(Minecraft minecraft, String extraInfo) static voidonWorldAccessFailure(Minecraft minecraft, String levelId) static voidonWorldDeleteFailure(Minecraft minecraft, String levelId) voidrender(GuiGraphics graphics, Font font, long fullyVisibleForMs) voidvoidupdate(ToastManager manager, long fullyVisibleForMs) intwidth()Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface Toast
getSoundEvent, occcupiedSlotCount, onFinishedRendering, xPos, yPos
-
Field Details
-
BACKGROUND_SPRITE
-
MAX_LINE_SIZE
private static final int MAX_LINE_SIZE- See Also:
-
LINE_SPACING
private static final int LINE_SPACING- See Also:
-
MARGIN
private static final int MARGIN- See Also:
-
id
-
title
-
messageLines
-
lastChanged
private long lastChanged -
changed
private boolean changed -
width
private final int width -
forceHide
private boolean forceHide -
wantedVisibility
-
-
Constructor Details
-
SystemToast
-
SystemToast
private SystemToast(SystemToast.SystemToastId id, Component title, List<FormattedCharSequence> messageLines, int width)
-
-
Method Details
-
multiline
public static SystemToast multiline(Minecraft minecraft, SystemToast.SystemToastId id, Component title, Component message) -
nullToEmpty
-
width
-
height
-
forceHide
public void forceHide() -
getWantedVisibility
- Specified by:
getWantedVisibilityin interfaceToast
-
update
-
render
-
reset
-
getToken
-
add
public static void add(ToastManager toastManager, SystemToast.SystemToastId id, Component title, @Nullable Component message) -
addOrUpdate
public static void addOrUpdate(ToastManager toastManager, SystemToast.SystemToastId id, Component title, @Nullable Component message) -
forceHide
-
onWorldAccessFailure
-
onWorldDeleteFailure
-
onPackCopyFailure
-
onFileDropFailure
-
onLowDiskSpace
-
onChunkLoadFailure
-
onChunkSaveFailure
-