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 theambientSound
record component.static final com.mojang.serialization.Codec
<Holder<WolfSoundVariant>> private final Holder
<SoundEvent> The field for thedeathSound
record component.static final com.mojang.serialization.Codec
<WolfSoundVariant> private final Holder
<SoundEvent> The field for thegrowlSound
record component.private final Holder
<SoundEvent> The field for thehurtSound
record component.static final com.mojang.serialization.Codec
<WolfSoundVariant> private final Holder
<SoundEvent> The field for thepantSound
record component.static final StreamCodec
<RegistryFriendlyByteBuf, Holder<WolfSoundVariant>> private final Holder
<SoundEvent> The field for thewhineSound
record 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 aWolfSoundVariant
record class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theambientSound
record component.Returns the value of thedeathSound
record component.final boolean
Indicates whether some other object is "equal to" this one.private static com.mojang.serialization.Codec
<WolfSoundVariant> Returns the value of thegrowlSound
record component.final int
hashCode()
Returns a hash code value for this object.Returns the value of thehurtSound
record component.Returns the value of thepantSound
record component.final String
toString()
Returns a string representation of this record class.Returns the value of thewhineSound
record component.
-
Field Details
-
ambientSound
The field for theambientSound
record component. -
deathSound
The field for thedeathSound
record component. -
growlSound
The field for thegrowlSound
record component. -
hurtSound
The field for thehurtSound
record component. -
pantSound
The field for thepantSound
record component. -
whineSound
The field for thewhineSound
record 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 aWolfSoundVariant
record class.- Parameters:
ambientSound
- the value for theambientSound
record componentdeathSound
- the value for thedeathSound
record componentgrowlSound
- the value for thegrowlSound
record componenthurtSound
- the value for thehurtSound
record componentpantSound
- the value for thepantSound
record componentwhineSound
- the value for thewhineSound
record 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 theambientSound
record component.- Returns:
- the value of the
ambientSound
record component
-
deathSound
Returns the value of thedeathSound
record component.- Returns:
- the value of the
deathSound
record component
-
growlSound
Returns the value of thegrowlSound
record component.- Returns:
- the value of the
growlSound
record component
-
hurtSound
Returns the value of thehurtSound
record component.- Returns:
- the value of the
hurtSound
record component
-
pantSound
Returns the value of thepantSound
record component.- Returns:
- the value of the
pantSound
record component
-
whineSound
Returns the value of thewhineSound
record component.- Returns:
- the value of the
whineSound
record component
-