Record Class WolfSoundVariant
java.lang.Object
java.lang.Record
net.minecraft.world.entity.animal.wolf.WolfSoundVariant
public record WolfSoundVariant(Holder<SoundEvent> ambientSound, Holder<SoundEvent> deathSound, Holder<SoundEvent> growlSound, Holder<SoundEvent> hurtSound, Holder<SoundEvent> pantSound, Holder<SoundEvent> whineSound)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Holder<SoundEvent> The field for theambientSoundrecord component.static final com.mojang.serialization.Codec<Holder<WolfSoundVariant>> private final Holder<SoundEvent> The field for thedeathSoundrecord component.static final com.mojang.serialization.Codec<WolfSoundVariant> private final Holder<SoundEvent> The field for thegrowlSoundrecord component.private final Holder<SoundEvent> The field for thehurtSoundrecord component.static final com.mojang.serialization.Codec<WolfSoundVariant> private final Holder<SoundEvent> The field for thepantSoundrecord component.static final StreamCodec<RegistryFriendlyByteBuf, Holder<WolfSoundVariant>> private final Holder<SoundEvent> The field for thewhineSoundrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionWolfSoundVariant(Holder<SoundEvent> ambientSound, Holder<SoundEvent> deathSound, Holder<SoundEvent> growlSound, Holder<SoundEvent> hurtSound, Holder<SoundEvent> pantSound, Holder<SoundEvent> whineSound) Creates an instance of aWolfSoundVariantrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theambientSoundrecord component.Returns the value of thedeathSoundrecord component.final booleanIndicates whether some other object is "equal to" this one.private static com.mojang.serialization.Codec<WolfSoundVariant> Returns the value of thegrowlSoundrecord component.final inthashCode()Returns a hash code value for this object.Returns the value of thehurtSoundrecord component.Returns the value of thepantSoundrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thewhineSoundrecord component.
-
Field Details
-
ambientSound
The field for theambientSoundrecord component. -
deathSound
The field for thedeathSoundrecord component. -
growlSound
The field for thegrowlSoundrecord component. -
hurtSound
The field for thehurtSoundrecord component. -
pantSound
The field for thepantSoundrecord component. -
whineSound
The field for thewhineSoundrecord component. -
DIRECT_CODEC
-
NETWORK_CODEC
-
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
WolfSoundVariant
public WolfSoundVariant(Holder<SoundEvent> ambientSound, Holder<SoundEvent> deathSound, Holder<SoundEvent> growlSound, Holder<SoundEvent> hurtSound, Holder<SoundEvent> pantSound, Holder<SoundEvent> whineSound) Creates an instance of aWolfSoundVariantrecord class.- Parameters:
ambientSound- the value for theambientSoundrecord componentdeathSound- the value for thedeathSoundrecord componentgrowlSound- the value for thegrowlSoundrecord componenthurtSound- the value for thehurtSoundrecord componentpantSound- the value for thepantSoundrecord componentwhineSound- the value for thewhineSoundrecord component
-
-
Method Details
-
getWolfSoundVariantCodec
-
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). -
ambientSound
Returns the value of theambientSoundrecord component.- Returns:
- the value of the
ambientSoundrecord component
-
deathSound
Returns the value of thedeathSoundrecord component.- Returns:
- the value of the
deathSoundrecord component
-
growlSound
Returns the value of thegrowlSoundrecord component.- Returns:
- the value of the
growlSoundrecord component
-
hurtSound
Returns the value of thehurtSoundrecord component.- Returns:
- the value of the
hurtSoundrecord component
-
pantSound
Returns the value of thepantSoundrecord component.- Returns:
- the value of the
pantSoundrecord component
-
whineSound
Returns the value of thewhineSoundrecord component.- Returns:
- the value of the
whineSoundrecord component
-