net.minecraft.village

public record VillagerData

net.minecraft.world.entity.npc.villager.VillagerData
net.minecraft.class_3850
net.minecraft.village.VillagerData

Field summary

Modifier and TypeField
private final RegistryEntry<VillagerType>
type
comp_3520
type
private final RegistryEntry<VillagerProfession>
profession
comp_3521
profession
private final int
level
comp_3522
level
public static final int
MIN_VILLAGER_LEVEL
field_30613
MIN_LEVEL
public static final int
MAX_VILLAGER_LEVEL
field_30614
MAX_LEVEL
private static final int[]
NEXT_LEVEL_XP_THRESHOLDS
field_18540
LEVEL_BASE_EXPERIENCE
public static final com.mojang.serialization.Codec<VillagerData>
CODEC
field_24669
CODEC
public static final PacketCodec<RegistryByteBuf, VillagerData>
STREAM_CODEC
field_48345
PACKET_CODEC

Constructor summary

ModifierConstructor
public (RegistryEntry<VillagerType> type, RegistryEntry<VillagerProfession> profession, int level)

Method summary

Modifier and TypeMethod
public VillagerData
withType(Holder<VillagerType> type)
method_16922(class_6880<class_3854> arg0)
withType(RegistryEntry<VillagerType> type)
public VillagerData
withType(HolderGetter$Provider registries, ResourceKey<VillagerType> type)
method_66687(class_7871$class_7872 arg0, class_5321<class_3854> arg1)
withType(RegistryEntryLookup$RegistryLookup registries, RegistryKey<VillagerType> typeKey)
public VillagerData
withProfession(Holder<VillagerProfession> profession)
method_16921(class_6880<class_3852> arg0)
withProfession(RegistryEntry<VillagerProfession> profession)
public VillagerData
withProfession(HolderGetter$Provider registries, ResourceKey<VillagerProfession> profession)
method_66688(class_7871$class_7872 arg0, class_5321<class_3852> arg1)
withProfession(RegistryEntryLookup$RegistryLookup registries, RegistryKey<VillagerProfession> professionKey)
public VillagerData
withLevel(int level)
method_16920(int arg0)
withLevel(int level)
public static int
getMinXpPerLevel(int level)
method_19194(int arg0)
getLowerLevelExperience(int level)
public static int
getMaxXpPerLevel(int level)
method_19195(int arg0)
getUpperLevelExperience(int level)
public static boolean
canLevelUp(int currentLevel)
method_19196(int arg0)
canLevelUp(int level)
public RegistryEntry<VillagerType>
type()
comp_3520()
type()
public RegistryEntry<VillagerProfession>
profession()
comp_3521()
profession()
public int
level()
comp_3522()
level()
private static com.mojang.datafixers.kinds.App
lambda$static$0(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_28372(com.mojang.serialization.codecs.RecordCodecBuilder$Instance arg0)
method_28372(com.mojang.serialization.codecs.RecordCodecBuilder$Instance instance)
private static Integer
lambda$static$5(VillagerData arg0)
method_28371(class_3850 arg0)
method_28371(VillagerData data)
private static RegistryEntry
lambda$static$4(VillagerData arg0)
method_28373(class_3850 arg0)
method_28373(VillagerData data)
private static RegistryEntry
lambda$static$3()
method_66689()
method_66689()
private static RegistryEntry
lambda$static$2(VillagerData arg0)
method_28374(class_3850 arg0)
method_28374(VillagerData data)
private static RegistryEntry
lambda$static$1()
method_66690()
method_66690()