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 Details

  • 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 a WolfSoundVariant record class.
      Parameters:
      ambientSound - the value for the ambientSound record component
      deathSound - the value for the deathSound record component
      growlSound - the value for the growlSound record component
      hurtSound - the value for the hurtSound record component
      pantSound - the value for the pantSound record component
      whineSound - the value for the whineSound record component
  • Method Details

    • getWolfSoundVariantCodec

      private static com.mojang.serialization.Codec<WolfSoundVariant> getWolfSoundVariantCodec()
    • toString

      public final String 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.
      Specified by:
      toString in class Record
      Returns:
      a string representation of this object
    • 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.
      Specified by:
      hashCode in class Record
      Returns:
      a hash code value for this object
    • equals

      public final boolean equals(Object o)
      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 with Objects::equals(Object,Object).
      Specified by:
      equals in class Record
      Parameters:
      o - the object with which to compare
      Returns:
      true if this object is the same as the o argument; false otherwise.
    • ambientSound

      public Holder<SoundEvent> ambientSound()
      Returns the value of the ambientSound record component.
      Returns:
      the value of the ambientSound record component
    • deathSound

      public Holder<SoundEvent> deathSound()
      Returns the value of the deathSound record component.
      Returns:
      the value of the deathSound record component
    • growlSound

      public Holder<SoundEvent> growlSound()
      Returns the value of the growlSound record component.
      Returns:
      the value of the growlSound record component
    • hurtSound

      public Holder<SoundEvent> hurtSound()
      Returns the value of the hurtSound record component.
      Returns:
      the value of the hurtSound record component
    • pantSound

      public Holder<SoundEvent> pantSound()
      Returns the value of the pantSound record component.
      Returns:
      the value of the pantSound record component
    • whineSound

      public Holder<SoundEvent> whineSound()
      Returns the value of the whineSound record component.
      Returns:
      the value of the whineSound record component