Package net.minecraft.world.entity.npc
Class VillagerData
java.lang.Object
net.minecraft.world.entity.npc.VillagerData
-
Field Summary
Modifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec
<VillagerData> private final int
static final int
static final int
private static final int[]
private final VillagerProfession
static final StreamCodec
<RegistryFriendlyByteBuf, VillagerData> private final 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:
-
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_)
-