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 static final intprivate List<FormattedCharSequence> private Toast.Visibilityprivate intFields inherited from interface Toast
DEFAULT_WIDTH, NO_TOKEN, SLOT_HEIGHT -
Constructor Summary
ConstructorsConstructorDescriptionSystemToast(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) voidextractRenderState(GuiGraphicsExtractor graphics, Font font, long fullyVisibleForMs) private voidextractTextLines(GuiGraphicsExtractor graphics, Font font, List<FormattedCharSequence> textLines, int yStart, int textColor) voidstatic voidforceHide(ToastManager toastManager, SystemToast.SystemToastId id) getToken()intheight()private static List<FormattedCharSequence> nullToEmpty(@Nullable Component text) 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) voidvoidprivate static List<FormattedCharSequence> splitToLength(Component text) voidupdate(ToastManager manager, long fullyVisibleForMs) private voidintwidth()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:
-
TEXT_X_START
private static final int TEXT_X_START- See Also:
-
id
-
titleLines
-
messageLines
-
lastChanged
private long lastChanged -
changed
private boolean changed -
width
private int width -
forceHide
private boolean forceHide -
wantedVisibility
-
-
Constructor Details
-
SystemToast
-
-
Method Details
-
nullToEmpty
-
splitToLength
-
width
-
height
-
forceHide
public void forceHide() -
getWantedVisibility
- Specified by:
getWantedVisibilityin interfaceToast
-
update
-
extractRenderState
- Specified by:
extractRenderStatein interfaceToast
-
extractTextLines
private void extractTextLines(GuiGraphicsExtractor graphics, Font font, List<FormattedCharSequence> textLines, int yStart, int textColor) -
reset
-
update
-
recalculateWidth
public void recalculateWidth() -
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
-