Package net.minecraft.entity.passive
Record Class PigVariant
java.lang.Object
java.lang.Record
net.minecraft.entity.passive.PigVariant
- Record Components:
modelAndTexture-spawnConditions-
- All Implemented Interfaces:
VariantSelectorProvider<SpawnContext,SpawnCondition>
public record PigVariant(ModelAndTexture<PigVariant.Model> modelAndTexture, SpawnConditionSelectors spawnConditions)
extends Record
implements VariantSelectorProvider<SpawnContext,SpawnCondition>
- Mappings:
Namespace Name named net/minecraft/entity/passive/PigVariantintermediary net/minecraft/class_10586official ckrnamed modelAndTextureintermediary comp_3562official enamed spawnConditionsintermediary comp_3563official f
-
Nested Class Summary
Nested ClassesNested classes/interfaces inherited from interface net.minecraft.entity.VariantSelectorProvider
VariantSelectorProvider.Selector<Context,Condition extends VariantSelectorProvider.SelectorCondition<Context>>, VariantSelectorProvider.SelectorCondition<C>, VariantSelectorProvider.UnwrappedSelector<C, T> -
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<PigVariant> static final com.mojang.serialization.Codec<RegistryEntry<PigVariant>> static final PacketCodec<RegistryByteBuf, RegistryEntry<PigVariant>> private final ModelAndTexture<PigVariant.Model> The field for themodelAndTexturerecord component.static final com.mojang.serialization.Codec<PigVariant> private final SpawnConditionSelectorsThe field for thespawnConditionsrecord component. -
Constructor Summary
ConstructorsModifierConstructorDescriptionprivatePigVariant(ModelAndTexture<PigVariant.Model> modelAndTexture) PigVariant(ModelAndTexture<PigVariant.Model> modelAndTexture, SpawnConditionSelectors spawnConditionSelectors) -
Method Summary
Modifier and TypeMethodDescriptionfinal 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. -
spawnConditions
The field for thespawnConditionsrecord component. -
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/entity/passive/PigVariant;CODEC:Lcom/mojang/serialization/Codec;intermediary field_55680Lnet/minecraft/class_10586;field_55680:Lcom/mojang/serialization/Codec;official aLckr;a:Lcom/mojang/serialization/Codec;
-
NETWORK_CODEC
- Mappings:
Namespace Name Mixin selector named NETWORK_CODECLnet/minecraft/entity/passive/PigVariant;NETWORK_CODEC:Lcom/mojang/serialization/Codec;intermediary field_56270Lnet/minecraft/class_10586;field_56270:Lcom/mojang/serialization/Codec;official bLckr;b:Lcom/mojang/serialization/Codec;
-
ENTRY_CODEC
- Mappings:
Namespace Name Mixin selector named ENTRY_CODECLnet/minecraft/entity/passive/PigVariant;ENTRY_CODEC:Lcom/mojang/serialization/Codec;intermediary field_55682Lnet/minecraft/class_10586;field_55682:Lcom/mojang/serialization/Codec;official cLckr;c:Lcom/mojang/serialization/Codec;
-
ENTRY_PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named ENTRY_PACKET_CODECLnet/minecraft/entity/passive/PigVariant;ENTRY_PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_55683Lnet/minecraft/class_10586;field_55683:Lnet/minecraft/class_9139;official dLckr;d:Lze;
-
-
Constructor Details
-
PigVariant
- Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/entity/passive/PigVariant;<init>(Lnet/minecraft/util/ModelAndTexture;)Vintermediary <init>Lnet/minecraft/class_10586;<init>(Lnet/minecraft/class_10693;)Vofficial <init>Lckr;<init>(Lcuj;)V
-
PigVariant
public PigVariant(ModelAndTexture<PigVariant.Model> modelAndTexture, SpawnConditionSelectors spawnConditionSelectors)
-
-
Method Details
-
getSelectors
- Specified by:
getSelectorsin interfaceVariantSelectorProvider<SpawnContext,SpawnCondition> - Mappings:
Namespace Name Mixin selector named getSelectorsLnet/minecraft/entity/VariantSelectorProvider;getSelectors()Ljava/util/List;intermediary method_67126Lnet/minecraft/class_10695;method_67126()Ljava/util/List;official aLcul;a()Ljava/util/List;
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
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
-
spawnConditions
Returns the value of thespawnConditionsrecord component.- Returns:
- the value of the
spawnConditionsrecord component
-