Record Class WolfSoundVariant
java.lang.Object
java.lang.Record
net.minecraft.world.entity.animal.wolf.WolfSoundVariant
public record WolfSoundVariant(WolfSoundVariant.WolfSoundSet adultSounds, WolfSoundVariant.WolfSoundSet babySounds)
extends Record
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final WolfSoundVariant.WolfSoundSetThe field for theadultSoundsrecord component.private final WolfSoundVariant.WolfSoundSetThe field for thebabySoundsrecord component.static final com.mojang.serialization.Codec<Holder<WolfSoundVariant>> static final com.mojang.serialization.Codec<WolfSoundVariant> static final com.mojang.serialization.Codec<WolfSoundVariant> static final StreamCodec<RegistryFriendlyByteBuf, Holder<WolfSoundVariant>> -
Constructor Summary
ConstructorsConstructorDescriptionWolfSoundVariant(WolfSoundVariant.WolfSoundSet adultSounds, WolfSoundVariant.WolfSoundSet babySounds) Creates an instance of aWolfSoundVariantrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theadultSoundsrecord component.Returns the value of thebabySoundsrecord component.final booleanIndicates whether some other object is "equal to" this one.private static com.mojang.serialization.Codec<WolfSoundVariant> 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
-
WolfSoundVariant
public WolfSoundVariant(WolfSoundVariant.WolfSoundSet adultSounds, WolfSoundVariant.WolfSoundSet babySounds) Creates an instance of aWolfSoundVariantrecord class.- Parameters:
adultSounds- the value for theadultSoundsrecord componentbabySounds- the value for thebabySoundsrecord component
-
-
Method Details
-
getWolfSoundVariantCodec
-
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
-