Package net.minecraft.world.entity.npc
Class VillagerData
java.lang.Object
net.minecraft.world.entity.npc.VillagerData
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<VillagerData> private final intstatic final intstatic final intprivate static final int[]private final VillagerProfessionstatic final StreamCodec<RegistryFriendlyByteBuf, VillagerData> private final VillagerType -
Constructor Summary
ConstructorsConstructorDescriptionVillagerData(VillagerType p_35557_, VillagerProfession p_35558_, int p_35559_) -
Method Summary
Modifier and TypeMethodDescriptionstatic booleancanLevelUp(int p_35583_) intgetLevel()static intgetMaxXpPerLevel(int p_35578_) static intgetMinXpPerLevel(int p_35573_) getType()setLevel(int p_35562_) setProfession(VillagerProfession p_35566_) setType(VillagerType p_35568_)
-
Field Details
-
MIN_VILLAGER_LEVEL
public static final int MIN_VILLAGER_LEVEL- See Also:
-
MAX_VILLAGER_LEVEL
public static final int MAX_VILLAGER_LEVEL- See Also:
-
NEXT_LEVEL_XP_THRESHOLDS
private static final int[] NEXT_LEVEL_XP_THRESHOLDS -
CODEC
-
STREAM_CODEC
-
type
-
profession
-
level
private final int level
-
-
Constructor Details
-
VillagerData
-
-
Method Details
-
getType
-
getProfession
-
getLevel
public int getLevel() -
setType
-
setProfession
-
setLevel
-
getMinXpPerLevel
public static int getMinXpPerLevel(int p_35573_) -
getMaxXpPerLevel
public static int getMaxXpPerLevel(int p_35578_) -
canLevelUp
public static boolean canLevelUp(int p_35583_)
-