Record Class ChickenVariant
java.lang.Object
java.lang.Record
net.minecraft.world.entity.animal.chicken.ChickenVariant
- All Implemented Interfaces:
PriorityProvider<SpawnContext, SpawnCondition>
public record ChickenVariant(ModelAndTexture<ChickenVariant.ModelType> modelAndTexture, ClientAsset.ResourceTexture babyTexture, SpawnPrioritySelectors spawnConditions)
extends Record
implements PriorityProvider<SpawnContext, SpawnCondition>
-
Nested Class Summary
Nested ClassesNested 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 thebabyTexturerecord component.static final com.mojang.serialization.Codec<Holder<ChickenVariant>> static final com.mojang.serialization.Codec<ChickenVariant> private final ModelAndTexture<ChickenVariant.ModelType> The field for themodelAndTexturerecord component.static final com.mojang.serialization.Codec<ChickenVariant> private final SpawnPrioritySelectorsThe field for thespawnConditionsrecord component.static final StreamCodec<RegistryFriendlyByteBuf, Holder<ChickenVariant>> -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivateChickenVariant(ModelAndTexture<ChickenVariant.ModelType> assetInfo, ClientAsset.ResourceTexture babyTexture) ChickenVariant(ModelAndTexture<ChickenVariant.ModelType> modelAndTexture, ClientAsset.ResourceTexture babyTexture, SpawnPrioritySelectors spawnConditions) Creates an instance of aChickenVariantrecord class. -
Method Summary
Modifier and TypeMethodDescriptionReturns the value of thebabyTexturerecord 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 themodelAndTexturerecord component.Returns the value of thespawnConditionsrecord component.final StringtoString()Returns a string representation of this record class.
-
Field Details
-
modelAndTexture
The field for themodelAndTexturerecord component. -
babyTexture
The field for thebabyTexturerecord component. -
spawnConditions
The field for thespawnConditionsrecord component. -
DIRECT_CODEC
-
NETWORK_CODEC
-
CODEC
-
STREAM_CODEC
-
-
Constructor Details
-
ChickenVariant
private ChickenVariant(ModelAndTexture<ChickenVariant.ModelType> assetInfo, ClientAsset.ResourceTexture babyTexture) -
ChickenVariant
public ChickenVariant(ModelAndTexture<ChickenVariant.ModelType> modelAndTexture, ClientAsset.ResourceTexture babyTexture, SpawnPrioritySelectors spawnConditions) Creates an instance of aChickenVariantrecord class.- Parameters:
modelAndTexture- the value for themodelAndTexturerecord componentbabyTexture- the value for thebabyTexturerecord 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). -
modelAndTexture
Returns the value of themodelAndTexturerecord component.- Returns:
- the value of the
modelAndTexturerecord component
-
babyTexture
Returns the value of thebabyTexturerecord component.- Returns:
- the value of the
babyTexturerecord component
-
spawnConditions
Returns the value of thespawnConditionsrecord component.- Returns:
- the value of the
spawnConditionsrecord component
-