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 net.minecraft.client.gui.components.toasts.Toast
Toast.Visibility
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final ResourceLocation
private boolean
private boolean
private final SystemToast.SystemToastId
private long
private static final int
private static final int
private static final int
private List
<FormattedCharSequence> private Component
private final int
Fields inherited from interface net.minecraft.client.gui.components.toasts.Toast
NO_TOKEN, SLOT_HEIGHT
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
SystemToast
(SystemToast.SystemToastId id, Component title, List<FormattedCharSequence> messageLines, int width) SystemToast
(SystemToast.SystemToastId id, Component title, Component message) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
add
(ToastComponent toastComponent, SystemToast.SystemToastId id, Component title, Component message) static void
addOrUpdate
(ToastComponent toastComponent, SystemToast.SystemToastId id, Component title, Component message) void
static void
forceHide
(ToastComponent toastComponent, SystemToast.SystemToastId id) getToken()
int
height()
static SystemToast
multiline
(Minecraft minecraft, SystemToast.SystemToastId id, Component title, Component message) private static com.google.common.collect.ImmutableList
<FormattedCharSequence> nullToEmpty
(Component message) static void
onChunkLoadFailure
(Minecraft minecraft, ChunkPos chunkPos) static void
onChunkSaveFailure
(Minecraft minecraft, ChunkPos chunkPos) static void
onFileDropFailure
(Minecraft minecraft, int failedFileCount) static void
onLowDiskSpace
(Minecraft minecraft) static void
onPackCopyFailure
(Minecraft minecraft, String message) static void
onWorldAccessFailure
(Minecraft minecraft, String message) static void
onWorldDeleteFailure
(Minecraft minecraft, String message) render
(GuiGraphics guiGraphics, ToastComponent toastComponent, long timeSinceLastVisible) private void
renderBackgroundRow
(GuiGraphics guiGraphics, int width, int vOffset, int y, int height) void
int
width()
-
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
-
-
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
private static com.google.common.collect.ImmutableList<FormattedCharSequence> nullToEmpty(@Nullable Component message) -
width
public int width() -
height
public int height() -
forceHide
public void forceHide() -
render
public Toast.Visibility render(GuiGraphics guiGraphics, ToastComponent toastComponent, long timeSinceLastVisible) -
renderBackgroundRow
private void renderBackgroundRow(GuiGraphics guiGraphics, int width, int vOffset, int y, int height) -
reset
-
getToken
-
add
public static void add(ToastComponent toastComponent, SystemToast.SystemToastId id, Component title, @Nullable Component message) -
addOrUpdate
public static void addOrUpdate(ToastComponent toastComponent, SystemToast.SystemToastId id, Component title, @Nullable Component message) -
forceHide
-
onWorldAccessFailure
-
onWorldDeleteFailure
-
onPackCopyFailure
-
onFileDropFailure
-
onLowDiskSpace
-
onChunkLoadFailure
-
onChunkSaveFailure
-