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 String
private static final int
private static long
private final Minecraft
private static final long
private static final int
private static final int
private static final ResourceLocation
private static int
private static int
private double
private static final ResourceLocation
private static final int
private static final int
private boolean
private static final int
private Toast.Visibility
Fields 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 Component
getNowPlayingString
(String pCurrentSong) private static int
int
height()
void
void
render
(GuiGraphics pGuiGraphics, Font pFont, long pVisibilityTime) static void
renderToast
(GuiGraphics pGuiGraphics, Font pFont) void
setWantedVisibility
(Toast.Visibility pWantedVisibility) void
static void
void
update
(ToastManager pToastManager, long pVisibilityTime) int
width()
float
xPos
(int pGuiWidth, float pVisiblePortion) float
yPos
(int pFirstSlotIndex) 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
-
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:
onFinishedRendering
in interfaceToast
-
width
public int width() -
getWidth
-
height
public int height() -
xPos
public float xPos(int pGuiWidth, float pVisiblePortion) -
yPos
public float yPos(int pFirstSlotIndex) -
getWantedVisibility
- Specified by:
getWantedVisibility
in interfaceToast
-
setWantedVisibility
-