Package net.minecraft.village
Record Class VillagerData
java.lang.Object
java.lang.Record
net.minecraft.village.VillagerData
- Record Components:
type-profession-level-
public record VillagerData(RegistryEntry<VillagerType> type, RegistryEntry<VillagerProfession> profession, int level)
extends Record
- Mappings:
Namespace Name named net/minecraft/village/VillagerDataintermediary net/minecraft/class_3850official crvnamed typeintermediary comp_3520official enamed professionintermediary comp_3521official fnamed levelintermediary comp_3522official g
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<VillagerData> private final intThe field for thelevelrecord component.private static final int[]static final intstatic final intstatic final PacketCodec<RegistryByteBuf, VillagerData> private final RegistryEntry<VillagerProfession> The field for theprofessionrecord component.private final RegistryEntry<VillagerType> The field for thetyperecord component. -
Constructor Summary
ConstructorsConstructorDescriptionVillagerData(RegistryEntry<VillagerType> registryEntry, RegistryEntry<VillagerProfession> registryEntry2, int level) -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanLevelUp(int level) final booleanIndicates whether some other object is "equal to" this one.static intgetLowerLevelExperience(int level) static intgetUpperLevelExperience(int level) final inthashCode()Returns a hash code value for this object.intlevel()Returns the value of thelevelrecord component.Returns the value of theprofessionrecord component.final StringtoString()Returns a string representation of this record class.type()Returns the value of thetyperecord component.withLevel(int level) withProfession(RegistryEntry<VillagerProfession> profession) withProfession(RegistryEntryLookup.RegistryLookup registries, RegistryKey<VillagerProfession> professionKey) withType(RegistryEntry<VillagerType> type) withType(RegistryEntryLookup.RegistryLookup registries, RegistryKey<VillagerType> typeKey)
-
Field Details
-
type
The field for thetyperecord component. -
profession
The field for theprofessionrecord component. -
level
private final int levelThe field for thelevelrecord component. -
MIN_LEVEL
public static final int MIN_LEVEL- See Also:
- Mappings:
Namespace Name Mixin selector named MIN_LEVELLnet/minecraft/village/VillagerData;MIN_LEVEL:Iintermediary field_30613Lnet/minecraft/class_3850;field_30613:Iofficial aLcrv;a:I
-
MAX_LEVEL
public static final int MAX_LEVEL- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_LEVELLnet/minecraft/village/VillagerData;MAX_LEVEL:Iintermediary field_30614Lnet/minecraft/class_3850;field_30614:Iofficial bLcrv;b:I
-
LEVEL_BASE_EXPERIENCE
private static final int[] LEVEL_BASE_EXPERIENCE- Mappings:
Namespace Name Mixin selector named LEVEL_BASE_EXPERIENCELnet/minecraft/village/VillagerData;LEVEL_BASE_EXPERIENCE:[Iintermediary field_18540Lnet/minecraft/class_3850;field_18540:[Iofficial hLcrv;h:[I
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODECLnet/minecraft/village/VillagerData;CODEC:Lcom/mojang/serialization/Codec;intermediary field_24669Lnet/minecraft/class_3850;field_24669:Lcom/mojang/serialization/Codec;official cLcrv;c:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODECLnet/minecraft/village/VillagerData;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;intermediary field_48345Lnet/minecraft/class_3850;field_48345:Lnet/minecraft/class_9139;official dLcrv;d:Lze;
-
-
Constructor Details
-
VillagerData
public VillagerData(RegistryEntry<VillagerType> registryEntry, RegistryEntry<VillagerProfession> registryEntry2, int level) - Mappings:
Namespace Name Mixin selector named <init>Lnet/minecraft/village/VillagerData;<init>(Lnet/minecraft/registry/entry/RegistryEntry;Lnet/minecraft/registry/entry/RegistryEntry;I)Vintermediary <init>Lnet/minecraft/class_3850;<init>(Lnet/minecraft/class_6880;Lnet/minecraft/class_6880;I)Vofficial <init>Lcrv;<init>(Ljg;Ljg;I)V
-
-
Method Details
-
withType
- Mappings:
Namespace Name Mixin selector named withTypeLnet/minecraft/village/VillagerData;withType(Lnet/minecraft/registry/entry/RegistryEntry;)Lnet/minecraft/village/VillagerData;intermediary method_16922Lnet/minecraft/class_3850;method_16922(Lnet/minecraft/class_6880;)Lnet/minecraft/class_3850;official aLcrv;a(Ljg;)Lcrv;
-
withType
public VillagerData withType(RegistryEntryLookup.RegistryLookup registries, RegistryKey<VillagerType> typeKey) - Mappings:
Namespace Name Mixin selector named withTypeLnet/minecraft/village/VillagerData;withType(Lnet/minecraft/registry/RegistryEntryLookup$RegistryLookup;Lnet/minecraft/registry/RegistryKey;)Lnet/minecraft/village/VillagerData;intermediary method_66687Lnet/minecraft/class_3850;method_66687(Lnet/minecraft/class_7871$class_7872;Lnet/minecraft/class_5321;)Lnet/minecraft/class_3850;official aLcrv;a(Ljh$a;Lalq;)Lcrv;
-
withProfession
- Mappings:
Namespace Name Mixin selector named withProfessionLnet/minecraft/village/VillagerData;withProfession(Lnet/minecraft/registry/entry/RegistryEntry;)Lnet/minecraft/village/VillagerData;intermediary method_16921Lnet/minecraft/class_3850;method_16921(Lnet/minecraft/class_6880;)Lnet/minecraft/class_3850;official bLcrv;b(Ljg;)Lcrv;
-
withProfession
public VillagerData withProfession(RegistryEntryLookup.RegistryLookup registries, RegistryKey<VillagerProfession> professionKey) - Mappings:
Namespace Name Mixin selector named withProfessionLnet/minecraft/village/VillagerData;withProfession(Lnet/minecraft/registry/RegistryEntryLookup$RegistryLookup;Lnet/minecraft/registry/RegistryKey;)Lnet/minecraft/village/VillagerData;intermediary method_66688Lnet/minecraft/class_3850;method_66688(Lnet/minecraft/class_7871$class_7872;Lnet/minecraft/class_5321;)Lnet/minecraft/class_3850;official bLcrv;b(Ljh$a;Lalq;)Lcrv;
-
withLevel
- Mappings:
Namespace Name Mixin selector named withLevelLnet/minecraft/village/VillagerData;withLevel(I)Lnet/minecraft/village/VillagerData;intermediary method_16920Lnet/minecraft/class_3850;method_16920(I)Lnet/minecraft/class_3850;official aLcrv;a(I)Lcrv;
-
getLowerLevelExperience
public static int getLowerLevelExperience(int level) - Mappings:
Namespace Name Mixin selector named getLowerLevelExperienceLnet/minecraft/village/VillagerData;getLowerLevelExperience(I)Iintermediary method_19194Lnet/minecraft/class_3850;method_19194(I)Iofficial bLcrv;b(I)I
-
getUpperLevelExperience
public static int getUpperLevelExperience(int level) - Mappings:
Namespace Name Mixin selector named getUpperLevelExperienceLnet/minecraft/village/VillagerData;getUpperLevelExperience(I)Iintermediary method_19195Lnet/minecraft/class_3850;method_19195(I)Iofficial cLcrv;c(I)I
-
canLevelUp
public static boolean canLevelUp(int level) - Mappings:
Namespace Name Mixin selector named canLevelUpLnet/minecraft/village/VillagerData;canLevelUp(I)Zintermediary method_19196Lnet/minecraft/class_3850;method_19196(I)Zofficial dLcrv;d(I)Z
-
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. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
type
Returns the value of thetyperecord component.- Returns:
- the value of the
typerecord component
-
profession
Returns the value of theprofessionrecord component.- Returns:
- the value of the
professionrecord component
-
level
public int level()Returns the value of thelevelrecord component.- Returns:
- the value of the
levelrecord component
-