Record Class CatSoundVariant
java.lang.Object
java.lang.Record
net.minecraft.world.entity.animal.feline.CatSoundVariant
public record CatSoundVariant(CatSoundVariant.CatSoundSet adultSounds, CatSoundVariant.CatSoundSet babySounds)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final CatSoundVariant.CatSoundSetThe field for theadultSoundsrecord component.private final CatSoundVariant.CatSoundSetThe field for thebabySoundsrecord component.static final com.mojang.serialization.Codec<Holder<CatSoundVariant>> static final com.mojang.serialization.Codec<CatSoundVariant> static final com.mojang.serialization.Codec<CatSoundVariant> static final StreamCodec<RegistryFriendlyByteBuf, Holder<CatSoundVariant>> -
Constructor Summary
ConstructorsConstructorDescriptionCatSoundVariant(CatSoundVariant.CatSoundSet adultSounds, CatSoundVariant.CatSoundSet babySounds) Creates an instance of aCatSoundVariantrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadultSoundsrecord component.Returns the value of thebabySoundsrecord component.private static com.mojang.serialization.Codec<CatSoundVariant> 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
-
CatSoundVariant
public CatSoundVariant(CatSoundVariant.CatSoundSet adultSounds, CatSoundVariant.CatSoundSet babySounds) Creates an instance of aCatSoundVariantrecord 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
-