Class TutorialToast
java.lang.Object
net.minecraft.client.gui.components.toasts.TutorialToast
- 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 final TutorialToast.Icons
private long
private static final int
private final List
<FormattedCharSequence> private static final int
private static final int
private float
static final int
static final int
static final int
static final int
private final boolean
private float
private static final int
private static final int
private final int
private Toast.Visibility
Fields inherited from interface net.minecraft.client.gui.components.toasts.Toast
DEFAULT_WIDTH, NO_TOKEN, SLOT_HEIGHT
-
Constructor Summary
ConstructorsConstructorDescriptionTutorialToast
(Font pFont, TutorialToast.Icons pIcon, Component pTitle, Component pMessage, boolean pProgressable) TutorialToast
(Font pFont, TutorialToast.Icons pIcon, Component pTitle, Component pMessage, boolean pProgressable, int pTimeToDisplayMs) -
Method Summary
Modifier and TypeMethodDescriptionprivate int
int
height()
void
hide()
void
render
(GuiGraphics pGuiGraphics, Font pFont, long pVisibilityTime) void
update
(ToastManager pToastManager, long pVisibilityTime) void
updateProgress
(float pProgress) 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, getToken, occcupiedSlotCount, onFinishedRendering, width, xPos, yPos
-
Field Details
-
BACKGROUND_SPRITE
-
PROGRESS_BAR_WIDTH
public static final int PROGRESS_BAR_WIDTH- See Also:
-
PROGRESS_BAR_HEIGHT
public static final int PROGRESS_BAR_HEIGHT- See Also:
-
PROGRESS_BAR_X
public static final int PROGRESS_BAR_X- See Also:
-
PROGRESS_BAR_MARGIN_BOTTOM
public static final int PROGRESS_BAR_MARGIN_BOTTOM- See Also:
-
PADDING_TOP
private static final int PADDING_TOP- See Also:
-
PADDING_BOTTOM
private static final int PADDING_BOTTOM- See Also:
-
LINE_SPACING
private static final int LINE_SPACING- See Also:
-
TEXT_LEFT
private static final int TEXT_LEFT- See Also:
-
TEXT_WIDTH
private static final int TEXT_WIDTH- See Also:
-
icon
-
lines
-
visibility
-
lastSmoothingTime
private long lastSmoothingTime -
smoothedProgress
private float smoothedProgress -
progress
private float progress -
progressable
private final boolean progressable -
timeToDisplayMs
private final int timeToDisplayMs
-
-
Constructor Details
-
TutorialToast
public TutorialToast(Font pFont, TutorialToast.Icons pIcon, Component pTitle, @Nullable Component pMessage, boolean pProgressable, int pTimeToDisplayMs) -
TutorialToast
public TutorialToast(Font pFont, TutorialToast.Icons pIcon, Component pTitle, @Nullable Component pMessage, boolean pProgressable)
-
-
Method Details
-
getWantedVisibility
- Specified by:
getWantedVisibility
in interfaceToast
-
update
-
height
public int height() -
contentHeight
private int contentHeight() -
render
-
hide
public void hide() -
updateProgress
public void updateProgress(float pProgress)
-