Class NowPlayingToast
java.lang.Object
net.minecraft.client.gui.components.toasts.NowPlayingToast
- All Implemented Interfaces:
Toast
-
Nested Class Summary
Nested classes/interfaces inherited from interface net.minecraft.client.gui.components.toasts.Toast
Toast.Visibility -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static Stringprivate static final intprivate static longprivate final Minecraftprivate static final longprivate static final intprivate static final intprivate static final ResourceLocationprivate static intprivate static intprivate doubleprivate static final ResourceLocationprivate static final intprivate static final intprivate booleanprivate static final intprivate Toast.VisibilityFields inherited from interface net.minecraft.client.gui.components.toasts.Toast
DEFAULT_WIDTH, NO_TOKEN, SLOT_HEIGHT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static ComponentgetNowPlayingString(String pCurrentSong) private static intintheight()voidvoidrender(GuiGraphics p_425876_, Font p_425951_, long p_425666_) static voidrenderToast(GuiGraphics pGuiGraphics, Font pFont) voidsetWantedVisibility(Toast.Visibility pWantedVisibility) voidstatic voidvoidupdate(ToastManager p_426277_, long p_425837_) intwidth()floatxPos(int p_425795_, float p_426267_) floatyPos(int p_425944_) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface net.minecraft.client.gui.components.toasts.Toast
getSoundEvent, getToken, occcupiedSlotCount
-
Field Details
-
NOW_PLAYING_BACKGROUND_SPRITE
-
MUSIC_NOTES_SPRITE
-
PADDING
private static final int PADDING- See Also:
-
MUSIC_NOTES_SIZE
private static final int MUSIC_NOTES_SIZE- See Also:
-
HEIGHT
private static final int HEIGHT- See Also:
-
MUSIC_NOTES_SPACE
private static final int MUSIC_NOTES_SPACE- See Also:
-
VISIBILITY_DURATION
private static final int VISIBILITY_DURATION- See Also:
-
TEXT_COLOR
private static final int TEXT_COLOR -
MUSIC_COLOR_CHANGE_FREQUENCY_MS
private static final long MUSIC_COLOR_CHANGE_FREQUENCY_MS- See Also:
-
musicNoteColorTick
private static int musicNoteColorTick -
lastMusicNoteColorChange
private static long lastMusicNoteColorChange -
musicNoteColor
private static int musicNoteColor -
updateToast
private boolean updateToast -
notificationDisplayTimeMultiplier
private double notificationDisplayTimeMultiplier -
currentSong
-
minecraft
-
wantedVisibility
-
-
Constructor Details
-
NowPlayingToast
public NowPlayingToast()
-
-
Method Details
-
renderToast
-
tickMusicNotes
public static void tickMusicNotes() -
getNowPlayingString
-
showToast
-
update
-
render
-
onFinishedRendering
public void onFinishedRendering()- Specified by:
onFinishedRenderingin interfaceToast
-
width
public int width() -
getWidth
-
height
public int height() -
xPos
public float xPos(int p_425795_, float p_426267_) -
yPos
public float yPos(int p_425944_) -
getWantedVisibility
- Specified by:
getWantedVisibilityin interfaceToast
-
setWantedVisibility
-