Package net.minecraft.client.sounds
Record Class MusicInfo
java.lang.Object
java.lang.Record
net.minecraft.client.sounds.MusicInfo
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionboolean
canReplace
(SoundInstance pSoundInstance) final boolean
Indicates whether some other object is "equal to" this one.final int
hashCode()
Returns a hash code value for this object.music()
Returns the value of themusic
record component.final String
toString()
Returns a string representation of this record class.float
volume()
Returns the value of thevolume
record component.
-
Field Details
-
music
The field for themusic
record component. -
volume
private final float volumeThe field for thevolume
record component.
-
-
Constructor Details
-
MusicInfo
-
MusicInfo
Creates an instance of aMusicInfo
record class.- Parameters:
music
- the value for themusic
record componentvolume
- the value for thevolume
record component
-
-
Method Details
-
canReplace
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object)
; primitive components are compared with '=='. -
music
Returns the value of themusic
record component.- Returns:
- the value of the
music
record component
-
volume
public float volume()Returns the value of thevolume
record component.- Returns:
- the value of the
volume
record component
-