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 ResourceLocationprivate booleanprivate booleanprivate final SystemToast.SystemToastIdprivate longprivate static final intprivate static final intprivate static final intprivate List<FormattedCharSequence> private Componentprivate final intFields inherited from interface net.minecraft.client.gui.components.toasts.Toast
NO_TOKEN, SLOT_HEIGHT -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateSystemToast(SystemToast.SystemToastId id, Component title, List<FormattedCharSequence> messageLines, int width) SystemToast(SystemToast.SystemToastId id, Component title, Component message) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidadd(ToastComponent toastComponent, SystemToast.SystemToastId id, Component title, Component message) static voidaddOrUpdate(ToastComponent toastComponent, SystemToast.SystemToastId id, Component title, Component message) voidstatic voidforceHide(ToastComponent toastComponent, SystemToast.SystemToastId id) getToken()intheight()static SystemToastmultiline(Minecraft minecraft, SystemToast.SystemToastId id, Component title, Component message) private static com.google.common.collect.ImmutableList<FormattedCharSequence> nullToEmpty(Component message) static voidonChunkLoadFailure(Minecraft minecraft, ChunkPos chunkPos) static voidonChunkSaveFailure(Minecraft minecraft, ChunkPos chunkPos) static voidonFileDropFailure(Minecraft minecraft, int failedFileCount) static voidonLowDiskSpace(Minecraft minecraft) static voidonPackCopyFailure(Minecraft minecraft, String message) static voidonWorldAccessFailure(Minecraft minecraft, String message) static voidonWorldDeleteFailure(Minecraft minecraft, String message) render(GuiGraphics guiGraphics, ToastComponent toastComponent, long timeSinceLastVisible) private voidrenderBackgroundRow(GuiGraphics guiGraphics, int width, int vOffset, int y, int height) voidintwidth()
-
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
-