Record Class PlaySoundConfiguration
java.lang.Object
java.lang.Record
net.thewinnt.cutscenes.effect.configuration.PlaySoundConfiguration
-
Constructor Summary
ConstructorsConstructorDescriptionPlaySoundConfiguration(net.minecraft.resources.ResourceLocation event, net.minecraft.sounds.SoundSource source, float volume, float pitch, Optional<net.minecraft.world.phys.Vec3> pos) Creates an instance of aPlaySoundConfigurationrecord class. -
Method Summary
Modifier and TypeMethodDescriptionfinal booleanIndicates whether some other object is "equal to" this one.net.minecraft.resources.ResourceLocationevent()Returns the value of theeventrecord component.final inthashCode()Returns a hash code value for this object.floatpitch()Returns the value of thepitchrecord component.Optional<net.minecraft.world.phys.Vec3> pos()Returns the value of theposrecord component.net.minecraft.sounds.SoundSourcesource()Returns the value of thesourcerecord component.final StringtoString()Returns a string representation of this record class.floatvolume()Returns the value of thevolumerecord component.
-
Constructor Details
-
PlaySoundConfiguration
public PlaySoundConfiguration(net.minecraft.resources.ResourceLocation event, net.minecraft.sounds.SoundSource source, float volume, float pitch, Optional<net.minecraft.world.phys.Vec3> pos) Creates an instance of aPlaySoundConfigurationrecord class.- Parameters:
event- the value for theeventrecord componentsource- the value for thesourcerecord componentvolume- the value for thevolumerecord componentpitch- the value for thepitchrecord componentpos- the value for theposrecord component
-
-
Method Details
-
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 '=='. -
event
public net.minecraft.resources.ResourceLocation event()Returns the value of theeventrecord component.- Returns:
- the value of the
eventrecord component
-
source
public net.minecraft.sounds.SoundSource source()Returns the value of thesourcerecord component.- Returns:
- the value of the
sourcerecord component
-
volume
public float volume()Returns the value of thevolumerecord component.- Returns:
- the value of the
volumerecord component
-
pitch
public float pitch()Returns the value of thepitchrecord component.- Returns:
- the value of the
pitchrecord component
-
pos
Returns the value of theposrecord component.- Returns:
- the value of the
posrecord component
-