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/VillagerData
intermediary net/minecraft/class_3850
official cug
named type
intermediary comp_3520
official e
named profession
intermediary comp_3521
official f
named level
intermediary comp_3522
official g
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<VillagerData> private final int
The field for thelevel
record component.private static final int[]
static final int
static final int
static final PacketCodec
<RegistryByteBuf, VillagerData> private final RegistryEntry
<VillagerProfession> The field for theprofession
record component.private final RegistryEntry
<VillagerType> The field for thetype
record component. -
Constructor Summary
ConstructorsConstructorDescriptionVillagerData
(RegistryEntry<VillagerType> registryEntry, RegistryEntry<VillagerProfession> registryEntry2, int level) -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
canLevelUp
(int level) final boolean
Indicates whether some other object is "equal to" this one.static int
getLowerLevelExperience
(int level) static int
getUpperLevelExperience
(int level) final int
hashCode()
Returns a hash code value for this object.int
level()
Returns the value of thelevel
record component.Returns the value of theprofession
record component.final String
toString()
Returns a string representation of this record class.type()
Returns the value of thetype
record 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 thetype
record component. -
profession
The field for theprofession
record component. -
level
private final int levelThe field for thelevel
record component. -
MIN_LEVEL
public static final int MIN_LEVEL- See Also:
- Mappings:
Namespace Name Mixin selector named MIN_LEVEL
Lnet/minecraft/village/VillagerData;MIN_LEVEL:I
intermediary field_30613
Lnet/minecraft/class_3850;field_30613:I
official a
Lcug;a:I
-
MAX_LEVEL
public static final int MAX_LEVEL- See Also:
- Mappings:
Namespace Name Mixin selector named MAX_LEVEL
Lnet/minecraft/village/VillagerData;MAX_LEVEL:I
intermediary field_30614
Lnet/minecraft/class_3850;field_30614:I
official b
Lcug;b:I
-
LEVEL_BASE_EXPERIENCE
private static final int[] LEVEL_BASE_EXPERIENCE- Mappings:
Namespace Name Mixin selector named LEVEL_BASE_EXPERIENCE
Lnet/minecraft/village/VillagerData;LEVEL_BASE_EXPERIENCE:[I
intermediary field_18540
Lnet/minecraft/class_3850;field_18540:[I
official h
Lcug;h:[I
-
CODEC
- Mappings:
Namespace Name Mixin selector named CODEC
Lnet/minecraft/village/VillagerData;CODEC:Lcom/mojang/serialization/Codec;
intermediary field_24669
Lnet/minecraft/class_3850;field_24669:Lcom/mojang/serialization/Codec;
official c
Lcug;c:Lcom/mojang/serialization/Codec;
-
PACKET_CODEC
- Mappings:
Namespace Name Mixin selector named PACKET_CODEC
Lnet/minecraft/village/VillagerData;PACKET_CODEC:Lnet/minecraft/network/codec/PacketCodec;
intermediary field_48345
Lnet/minecraft/class_3850;field_48345:Lnet/minecraft/class_9139;
official d
Lcug;d:Lzm;
-
-
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)V
intermediary <init>
Lnet/minecraft/class_3850;<init>(Lnet/minecraft/class_6880;Lnet/minecraft/class_6880;I)V
official <init>
Lcug;<init>(Ljl;Ljl;I)V
-
-
Method Details
-
withType
- Mappings:
Namespace Name Mixin selector named withType
Lnet/minecraft/village/VillagerData;withType(Lnet/minecraft/registry/entry/RegistryEntry;)Lnet/minecraft/village/VillagerData;
intermediary method_16922
Lnet/minecraft/class_3850;method_16922(Lnet/minecraft/class_6880;)Lnet/minecraft/class_3850;
official a
Lcug;a(Ljl;)Lcug;
-
withType
public VillagerData withType(RegistryEntryLookup.RegistryLookup registries, RegistryKey<VillagerType> typeKey) - Mappings:
Namespace Name Mixin selector named withType
Lnet/minecraft/village/VillagerData;withType(Lnet/minecraft/registry/RegistryEntryLookup$RegistryLookup;Lnet/minecraft/registry/RegistryKey;)Lnet/minecraft/village/VillagerData;
intermediary method_66687
Lnet/minecraft/class_3850;method_66687(Lnet/minecraft/class_7871$class_7872;Lnet/minecraft/class_5321;)Lnet/minecraft/class_3850;
official a
Lcug;a(Ljm$a;Lamd;)Lcug;
-
withProfession
- Mappings:
Namespace Name Mixin selector named withProfession
Lnet/minecraft/village/VillagerData;withProfession(Lnet/minecraft/registry/entry/RegistryEntry;)Lnet/minecraft/village/VillagerData;
intermediary method_16921
Lnet/minecraft/class_3850;method_16921(Lnet/minecraft/class_6880;)Lnet/minecraft/class_3850;
official b
Lcug;b(Ljl;)Lcug;
-
withProfession
public VillagerData withProfession(RegistryEntryLookup.RegistryLookup registries, RegistryKey<VillagerProfession> professionKey) - Mappings:
Namespace Name Mixin selector named withProfession
Lnet/minecraft/village/VillagerData;withProfession(Lnet/minecraft/registry/RegistryEntryLookup$RegistryLookup;Lnet/minecraft/registry/RegistryKey;)Lnet/minecraft/village/VillagerData;
intermediary method_66688
Lnet/minecraft/class_3850;method_66688(Lnet/minecraft/class_7871$class_7872;Lnet/minecraft/class_5321;)Lnet/minecraft/class_3850;
official b
Lcug;b(Ljm$a;Lamd;)Lcug;
-
withLevel
- Mappings:
Namespace Name Mixin selector named withLevel
Lnet/minecraft/village/VillagerData;withLevel(I)Lnet/minecraft/village/VillagerData;
intermediary method_16920
Lnet/minecraft/class_3850;method_16920(I)Lnet/minecraft/class_3850;
official a
Lcug;a(I)Lcug;
-
getLowerLevelExperience
public static int getLowerLevelExperience(int level) - Mappings:
Namespace Name Mixin selector named getLowerLevelExperience
Lnet/minecraft/village/VillagerData;getLowerLevelExperience(I)I
intermediary method_19194
Lnet/minecraft/class_3850;method_19194(I)I
official b
Lcug;b(I)I
-
getUpperLevelExperience
public static int getUpperLevelExperience(int level) - Mappings:
Namespace Name Mixin selector named getUpperLevelExperience
Lnet/minecraft/village/VillagerData;getUpperLevelExperience(I)I
intermediary method_19195
Lnet/minecraft/class_3850;method_19195(I)I
official c
Lcug;c(I)I
-
canLevelUp
public static boolean canLevelUp(int level) - Mappings:
Namespace Name Mixin selector named canLevelUp
Lnet/minecraft/village/VillagerData;canLevelUp(I)Z
intermediary method_19196
Lnet/minecraft/class_3850;method_19196(I)Z
official d
Lcug;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 thetype
record component.- Returns:
- the value of the
type
record component
-
profession
Returns the value of theprofession
record component.- Returns:
- the value of the
profession
record component
-
level
public int level()Returns the value of thelevel
record component.- Returns:
- the value of the
level
record component
-