Record Class MobVariants.Sounds
java.lang.Object
java.lang.Record
net.rebel459.unified.impl.data.helper.MobVariants.Sounds
- Enclosing class:
MobVariants
public static record MobVariants.Sounds(Optional<net.minecraft.sounds.SoundEvent> ambientSound, Optional<net.minecraft.sounds.SoundEvent> hurtSound, Optional<net.minecraft.sounds.SoundEvent> eatSound, Optional<net.minecraft.sounds.SoundEvent> deathSound, Optional<net.minecraft.sounds.SoundEvent> stepSound)
extends Record
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<MobVariants.Sounds> static final MobVariants.Sounds -
Constructor Summary
ConstructorsConstructorDescriptionSounds(Optional<net.minecraft.sounds.SoundEvent> ambientSound, Optional<net.minecraft.sounds.SoundEvent> hurtSound, Optional<net.minecraft.sounds.SoundEvent> eatSound, Optional<net.minecraft.sounds.SoundEvent> deathSound, Optional<net.minecraft.sounds.SoundEvent> stepSound) Creates an instance of aSoundsrecord class. -
Method Summary
Modifier and TypeMethodDescriptionOptional<net.minecraft.sounds.SoundEvent> Returns the value of theambientSoundrecord component.Optional<net.minecraft.sounds.SoundEvent> Returns the value of thedeathSoundrecord component.Optional<net.minecraft.sounds.SoundEvent> eatSound()Returns the value of theeatSoundrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.Optional<net.minecraft.sounds.SoundEvent> Returns the value of thehurtSoundrecord component.Optional<net.minecraft.sounds.SoundEvent> Returns the value of thestepSoundrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
CODEC
-
EMPTY
-
-
Constructor Details
-
Sounds
public Sounds(Optional<net.minecraft.sounds.SoundEvent> ambientSound, Optional<net.minecraft.sounds.SoundEvent> hurtSound, Optional<net.minecraft.sounds.SoundEvent> eatSound, Optional<net.minecraft.sounds.SoundEvent> deathSound, Optional<net.minecraft.sounds.SoundEvent> stepSound) Creates an instance of aSoundsrecord class.- Parameters:
ambientSound- the value for theambientSoundrecord componenthurtSound- the value for thehurtSoundrecord componenteatSound- the value for theeatSoundrecord 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
-
eatSound
Returns the value of theeatSoundrecord component.- Returns:
- the value of the
eatSoundrecord 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
-