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 Toast.Visibility
private final int
Fields inherited from interface net.minecraft.client.gui.components.toasts.Toast
DEFAULT_WIDTH, NO_TOKEN, SLOT_HEIGHT
-
Constructor Summary
ConstructorsModifierConstructorDescriptionprivate
SystemToast
(SystemToast.SystemToastId pId, Component pTitle, List<FormattedCharSequence> pMessageLines, int pWidth) SystemToast
(SystemToast.SystemToastId pId, Component pTitle, Component pMessage) -
Method Summary
Modifier and TypeMethodDescriptionstatic void
add
(ToastManager pToastManager, SystemToast.SystemToastId pId, Component pTitle, Component pMessage) static void
addOrUpdate
(ToastManager pToastManager, SystemToast.SystemToastId pId, Component pTitle, Component pMessage) void
static void
forceHide
(ToastManager pToastManager, SystemToast.SystemToastId pId) getToken()
int
height()
static SystemToast
multiline
(Minecraft pMinecraft, SystemToast.SystemToastId pId, Component pTitle, Component pMessage) private static com.google.common.collect.ImmutableList
<FormattedCharSequence> nullToEmpty
(Component p_94861_) static void
onChunkLoadFailure
(Minecraft pMinecraft, ChunkPos pChunkPos) static void
onChunkSaveFailure
(Minecraft pMinecraft, ChunkPos pChunkPos) static void
onFileDropFailure
(Minecraft pMinecraft, int pFailedFileCount) static void
onLowDiskSpace
(Minecraft pMinecraft) static void
onPackCopyFailure
(Minecraft pMinecraft, String pMessage) static void
onWorldAccessFailure
(Minecraft pMinecraft, String pMessage) static void
onWorldDeleteFailure
(Minecraft pMinecraft, String pMessage) void
render
(GuiGraphics pGuiGraphics, Font pFont, long pVisibilityTime) void
void
update
(ToastManager pToastManager, long pVisibilityTime) int
width()
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface net.minecraft.client.gui.components.toasts.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 pId, Component pTitle, List<FormattedCharSequence> pMessageLines, int pWidth)
-
-
Method Details
-
multiline
public static SystemToast multiline(Minecraft pMinecraft, SystemToast.SystemToastId pId, Component pTitle, Component pMessage) -
nullToEmpty
private static com.google.common.collect.ImmutableList<FormattedCharSequence> nullToEmpty(@Nullable Component p_94861_) -
width
public int width() -
height
public int height() -
forceHide
public void forceHide() -
getWantedVisibility
- Specified by:
getWantedVisibility
in interfaceToast
-
update
-
render
-
reset
-
getToken
-
add
public static void add(ToastManager pToastManager, SystemToast.SystemToastId pId, Component pTitle, @Nullable Component pMessage) -
addOrUpdate
public static void addOrUpdate(ToastManager pToastManager, SystemToast.SystemToastId pId, Component pTitle, @Nullable Component pMessage) -
forceHide
-
onWorldAccessFailure
-
onWorldDeleteFailure
-
onPackCopyFailure
-
onFileDropFailure
-
onLowDiskSpace
-
onChunkLoadFailure
-
onChunkSaveFailure
-