Package net.minecraft.world.attribute
Record Class AmbientSounds
java.lang.Object
java.lang.Record
net.minecraft.world.attribute.AmbientSounds
public record AmbientSounds(Optional<Holder<SoundEvent>> loop, Optional<AmbientMoodSettings> mood, List<AmbientAdditionsSettings> additions)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final List<AmbientAdditionsSettings> The field for theadditionsrecord component.static final com.mojang.serialization.Codec<AmbientSounds> static final AmbientSoundsstatic final AmbientSoundsprivate final Optional<Holder<SoundEvent>> The field for thelooprecord component.private final Optional<AmbientMoodSettings> The field for themoodrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionAmbientSounds(Optional<Holder<SoundEvent>> loop, Optional<AmbientMoodSettings> mood, List<AmbientAdditionsSettings> additions) Creates an instance of aAmbientSoundsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadditionsrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.loop()Returns the value of thelooprecord component.mood()Returns the value of themoodrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
loop
The field for thelooprecord component. -
mood
The field for themoodrecord component. -
additions
The field for theadditionsrecord component. -
EMPTY
-
LEGACY_CAVE_SETTINGS
-
CODEC
-
-
Constructor Details
-
AmbientSounds
public AmbientSounds(Optional<Holder<SoundEvent>> loop, Optional<AmbientMoodSettings> mood, List<AmbientAdditionsSettings> additions) Creates an instance of aAmbientSoundsrecord class.- Parameters:
loop- the value for thelooprecord componentmood- the value for themoodrecord componentadditions- the value for theadditionsrecord 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. All components in this record class are compared withObjects::equals(Object,Object). -
loop
Returns the value of thelooprecord component.- Returns:
- the value of the
looprecord component
-
mood
Returns the value of themoodrecord component.- Returns:
- the value of the
moodrecord component
-
additions
Returns the value of theadditionsrecord component.- Returns:
- the value of the
additionsrecord component
-