Package net.minecraft.world.entity.npc
Class VillagerData
java.lang.Object
net.minecraft.world.entity.npc.VillagerData
-
Field Summary
Modifier and TypeFieldDescriptionstatic com.mojang.serialization.Codec<VillagerData>
private int
static int
static int
private static int[]
private VillagerProfession
private VillagerType
-
Constructor Summary
ConstructorDescriptionVillagerData(VillagerType p_35557_, VillagerProfession p_35558_, int p_35559_)
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
canLevelUp(int p_35583_)
int
getLevel()
static int
getMaxXpPerLevel(int p_35578_)
static int
getMinXpPerLevel(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:
- Constant Field Values
-
MAX_VILLAGER_LEVEL
public static final int MAX_VILLAGER_LEVEL- See Also:
- Constant Field Values
-
NEXT_LEVEL_XP_THRESHOLDS
private static final int[] NEXT_LEVEL_XP_THRESHOLDS -
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_)
-