Record Class ChickenSoundVariant
java.lang.Object
java.lang.Record
net.minecraft.world.entity.animal.chicken.ChickenSoundVariant
public record ChickenSoundVariant(ChickenSoundVariant.ChickenSoundSet adultSounds, ChickenSoundVariant.ChickenSoundSet babySounds)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ChickenSoundVariant.ChickenSoundSetThe field for theadultSoundsrecord component.private final ChickenSoundVariant.ChickenSoundSetThe field for thebabySoundsrecord component.static final com.mojang.serialization.Codec<Holder<ChickenSoundVariant>> static final com.mojang.serialization.Codec<ChickenSoundVariant> static final com.mojang.serialization.Codec<ChickenSoundVariant> static final StreamCodec<RegistryFriendlyByteBuf, Holder<ChickenSoundVariant>> -
Constructor Summary
ConstructorsConstructorDescriptionChickenSoundVariant(ChickenSoundVariant.ChickenSoundSet adultSounds, ChickenSoundVariant.ChickenSoundSet babySounds) Creates an instance of aChickenSoundVariantrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadultSoundsrecord component.Returns the value of thebabySoundsrecord component.private static com.mojang.serialization.Codec<ChickenSoundVariant> codec()final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
adultSounds
The field for theadultSoundsrecord component. -
babySounds
The field for thebabySoundsrecord component. -
DIRECT_CODEC
-
NETWORK_CODEC
-
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
ChickenSoundVariant
public ChickenSoundVariant(ChickenSoundVariant.ChickenSoundSet adultSounds, ChickenSoundVariant.ChickenSoundSet babySounds) Creates an instance of aChickenSoundVariantrecord class.- Parameters:
adultSounds- the value for theadultSoundsrecord componentbabySounds- the value for thebabySoundsrecord component
-
-
Method Details
-
codec
-
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). -
adultSounds
Returns the value of theadultSoundsrecord component.- Returns:
- the value of the
adultSoundsrecord component
-
babySounds
Returns the value of thebabySoundsrecord component.- Returns:
- the value of the
babySoundsrecord component
-