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 Toast
Toast.Visibility -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final intprivate static longprivate final Minecraftprivate static final longprivate static final intprivate static final intprivate static final Identifierprivate static intprivate static intprivate doubleprivate static final Identifierprivate static final intprivate static final intprivate booleanprivate static final intprivate Toast.VisibilityFields inherited from interface Toast
DEFAULT_WIDTH, NO_TOKEN, SLOT_HEIGHT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static @Nullable Stringprivate static ComponentgetNowPlayingString(@Nullable String currentSongKey) private static intintheight()voidvoidrender(GuiGraphics graphics, Font font, long fullyVisibleForMs) static voidrenderToast(GuiGraphics graphics, Font font) voidsetWantedVisibility(Toast.Visibility visibility) voidstatic voidvoidupdate(ToastManager manager, long fullyVisibleForMs) intwidth()floatxPos(int screenWidth, float visiblePortion) floatyPos(int firstSlotIndex) Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface 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 -
minecraft
-
wantedVisibility
-
-
Constructor Details
-
NowPlayingToast
public NowPlayingToast()
-
-
Method Details
-
renderToast
-
getCurrentSongName
-
tickMusicNotes
public static void tickMusicNotes() -
getNowPlayingString
-
showToast
-
update
-
render
-
onFinishedRendering
public void onFinishedRendering()- Specified by:
onFinishedRenderingin interfaceToast
-
width
-
getWidth
-
height
-
xPos
-
yPos
-
getWantedVisibility
- Specified by:
getWantedVisibilityin interfaceToast
-
setWantedVisibility
-