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 pId, Component pTitle, List<FormattedCharSequence> pMessageLines, int pWidth) SystemToast(SystemToast.SystemToastId pId, Component pTitle, Component pMessage) -
Method Summary
Modifier and TypeMethodDescriptionstatic voidadd(ToastComponent pToastComponent, SystemToast.SystemToastId pId, Component pTitle, Component pMessage) static voidaddOrUpdate(ToastComponent pToastComponent, SystemToast.SystemToastId pId, Component pTitle, Component pMessage) voidstatic voidforceHide(ToastComponent pToastComponent, SystemToast.SystemToastId pId) getToken()intheight()static SystemToastmultiline(Minecraft pMinecraft, SystemToast.SystemToastId pId, Component pTitle, Component pMessage) private static ImmutableList<FormattedCharSequence> nullToEmpty(Component pMessage) static voidonChunkLoadFailure(Minecraft pMinecraft, ChunkPos pChunkPos) static voidonChunkSaveFailure(Minecraft pMinecraft, ChunkPos pChunkPos) static voidonFileDropFailure(Minecraft pMinecraft, int pFailedFileCount) static voidonLowDiskSpace(Minecraft pMinecraft) static voidonPackCopyFailure(Minecraft pMinecraft, String pMessage) static voidonWorldAccessFailure(Minecraft pMinecraft, String pMessage) static voidonWorldDeleteFailure(Minecraft pMinecraft, String pMessage) render(GuiGraphics pGuiGraphics, ToastComponent pToastComponent, long pTimeSinceLastVisible) private voidrenderBackgroundRow(GuiGraphics pGuiGraphics, int pWidth, int pVOffset, int pY, int pHeight) 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 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
-
width
public int width() -
height
public int height() -
forceHide
public void forceHide() -
render
public Toast.Visibility render(GuiGraphics pGuiGraphics, ToastComponent pToastComponent, long pTimeSinceLastVisible) -
renderBackgroundRow
private void renderBackgroundRow(GuiGraphics pGuiGraphics, int pWidth, int pVOffset, int pY, int pHeight) -
reset
-
getToken
-
add
public static void add(ToastComponent pToastComponent, SystemToast.SystemToastId pId, Component pTitle, @Nullable Component pMessage) -
addOrUpdate
public static void addOrUpdate(ToastComponent pToastComponent, SystemToast.SystemToastId pId, Component pTitle, @Nullable Component pMessage) -
forceHide
-
onWorldAccessFailure
-
onWorldDeleteFailure
-
onPackCopyFailure
-
onFileDropFailure
-
onLowDiskSpace
-
onChunkLoadFailure
-
onChunkSaveFailure
-