Klasse SoundFileInfo
java.lang.Object
de.mrjulsen.dragnsounds.core.filesystem.SoundFileInfo
- Alle implementierten Schnittstellen:
de.mrjulsen.mcdragonlib.data.INBTSerializable
A collection of read-only properties about the file.
-
Feldübersicht
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibungvoid
deserializeNbt
(net.minecraft.nbt.CompoundTag nbt) static SoundFileInfo
empty()
static SoundFileInfo
fromNbt
(net.minecraft.nbt.CompoundTag nbt) getAlbum()
int
getDate()
long
A shortcut to get the playback duration of the sound file.getGenre()
long
getSize()
A shortcut to get the size of the sound file.long
static SoundFileInfo
net.minecraft.nbt.CompoundTag
-
Felddetails
-
META_TITLE
- Siehe auch:
-
META_ARTIST
- Siehe auch:
-
META_YEAR
- Siehe auch:
-
META_ALBUM
- Siehe auch:
-
META_GENRE
- Siehe auch:
-
-
Konstruktordetails
-
SoundFileInfo
-
-
Methodendetails
-
getDuration
public long getDuration()A shortcut to get the playback duration of the sound file. Use this method instead of other methods to calculate it, since it has higher performance. The value changes automatically when the file hash changes.- Gibt zurück:
- The playback duration in seconds.
-
getSize
public long getSize()A shortcut to get the size of the sound file. Use this method instead of other methods to calculate it, since it has higher performance. The value changes automatically when the file hash changes.- Gibt zurück:
- The size of the file in bytes.
-
getOwnerId
- Gibt zurück:
- The UUID of the player which has uploaded this file.
-
getUploadTimeMillis
public long getUploadTimeMillis()- Gibt zurück:
- The timestamp in millis when the player has uploaded this file.
-
getUploadDate
- Gibt zurück:
- A formatted representation of the time when the player has uploaded this file.
-
getUploadTimeFormatted
- Gibt zurück:
- A formatted representation of the time when the player has uploaded this file.
-
getOriginalTitle
- Gibt zurück:
- The original title of the sound file which has been uploaded.
-
getArtist
- Gibt zurück:
- The original artist of the sound file which has been uploaded.
-
getDate
- Gibt zurück:
- The original date of the sound file which has been uploaded.
-
getGenre
- Gibt zurück:
- The original genre of the sound file which has been uploaded.
-
getAlbum
- Gibt zurück:
- The original album of the sound file which has been uploaded.
-
getChannels
public int getChannels()- Gibt zurück:
- The amount of audio channels in this file.
-
fromNbt
-
serializeNbt
public net.minecraft.nbt.CompoundTag serializeNbt()- Angegeben von:
serializeNbt
in Schnittstellede.mrjulsen.mcdragonlib.data.INBTSerializable
-
deserializeNbt
public void deserializeNbt(net.minecraft.nbt.CompoundTag nbt) - Angegeben von:
deserializeNbt
in Schnittstellede.mrjulsen.mcdragonlib.data.INBTSerializable
-
empty
-
of
public static SoundFileInfo of(File file, UUID owner, long timestamp, int initialChannels, long initialDuration)
-