Record Class PigSoundVariant.PigSoundSet
java.lang.Object
java.lang.Record
net.minecraft.world.entity.animal.pig.PigSoundVariant.PigSoundSet
- Enclosing class:
PigSoundVariant
public static record PigSoundVariant.PigSoundSet(Holder<SoundEvent> ambientSound, Holder<SoundEvent> hurtSound, Holder<SoundEvent> deathSound, Holder<SoundEvent> stepSound)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final Holder<SoundEvent> The field for theambientSoundrecord component.static final com.mojang.serialization.Codec<PigSoundVariant.PigSoundSet> private final Holder<SoundEvent> The field for thedeathSoundrecord component.private final Holder<SoundEvent> The field for thehurtSoundrecord component.private final Holder<SoundEvent> The field for thestepSoundrecord component. -
Constructor Summary
ConstructorsConstructorDescriptionPigSoundSet(Holder<SoundEvent> ambientSound, Holder<SoundEvent> hurtSound, Holder<SoundEvent> deathSound, Holder<SoundEvent> stepSound) Creates an instance of aPigSoundSetrecord 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.final inthashCode()Returns a hash code value for this object.Returns the value of thehurtSoundrecord component.Returns the value of thestepSoundrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
ambientSound
The field for theambientSoundrecord component. -
hurtSound
The field for thehurtSoundrecord component. -
deathSound
The field for thedeathSoundrecord component. -
stepSound
The field for thestepSoundrecord component. -
CODEC
-
-
Constructor Details
-
PigSoundSet
public PigSoundSet(Holder<SoundEvent> ambientSound, Holder<SoundEvent> hurtSound, Holder<SoundEvent> deathSound, Holder<SoundEvent> stepSound) Creates an instance of aPigSoundSetrecord class.- Parameters:
ambientSound- the value for theambientSoundrecord componenthurtSound- the value for thehurtSoundrecord componentdeathSound- the value for thedeathSoundrecord componentstepSound- the value for thestepSoundrecord component
-
-
Method Details
-
toString
-
hashCode
-
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
-
hurtSound
Returns the value of thehurtSoundrecord component.- Returns:
- the value of the
hurtSoundrecord component
-
deathSound
Returns the value of thedeathSoundrecord component.- Returns:
- the value of the
deathSoundrecord component
-
stepSound
Returns the value of thestepSoundrecord component.- Returns:
- the value of the
stepSoundrecord component
-