Record Class FrogVariant
java.lang.Object
java.lang.Record
net.minecraft.world.entity.animal.frog.FrogVariant
- All Implemented Interfaces:
PriorityProvider<SpawnContext, SpawnCondition>
public record FrogVariant(ClientAsset.ResourceTexture assetInfo, SpawnPrioritySelectors spawnConditions)
extends Record
implements PriorityProvider<SpawnContext, SpawnCondition>
-
Nested Class Summary
Nested classes/interfaces inherited from interface PriorityProvider
PriorityProvider.Selector<Context, Condition>, PriorityProvider.SelectorCondition<C>, PriorityProvider.UnpackedEntry<C,T> -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final ClientAsset.ResourceTextureThe field for theassetInforecord component.static final com.mojang.serialization.Codec<Holder<FrogVariant>> static final com.mojang.serialization.Codec<FrogVariant> static final com.mojang.serialization.Codec<FrogVariant> private final SpawnPrioritySelectorsThe field for thespawnConditionsrecord component.static final StreamCodec<RegistryFriendlyByteBuf, Holder<FrogVariant>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateFrogVariant(ClientAsset.ResourceTexture assetInfo) FrogVariant(ClientAsset.ResourceTexture assetInfo, SpawnPrioritySelectors spawnConditions) Creates an instance of aFrogVariantrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of theassetInforecord 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 thespawnConditionsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
assetInfo
The field for theassetInforecord component. -
spawnConditions
The field for thespawnConditionsrecord component. -
DIRECT_CODEC
-
NETWORK_CODEC
-
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
FrogVariant
-
FrogVariant
Creates an instance of aFrogVariantrecord class.- Parameters:
assetInfo- the value for theassetInforecord componentspawnConditions- the value for thespawnConditionsrecord component
-
-
Method Details
-
selectors
- Specified by:
selectorsin interfacePriorityProvider<SpawnContext, SpawnCondition>
-
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). -
assetInfo
Returns the value of theassetInforecord component.- Returns:
- the value of the
assetInforecord component
-
spawnConditions
Returns the value of thespawnConditionsrecord component.- Returns:
- the value of the
spawnConditionsrecord component
-