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 int
static final int
static final int
private static final int[]
private final VillagerProfession
static final StreamCodec
<RegistryFriendlyByteBuf, VillagerData> private final VillagerType
-
Constructor Summary
ConstructorsConstructorDescriptionVillagerData
(VillagerType p_35557_, VillagerProfession p_35558_, int p_35559_) -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
canLevelUp
(int pLevel) int
getLevel()
static int
getMaxXpPerLevel
(int pLevel) static int
getMinXpPerLevel
(int pLevel) getType()
setLevel
(int pLevel) setProfession
(VillagerProfession pProfession) setType
(VillagerType pType)
-
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 pLevel) -
getMaxXpPerLevel
public static int getMaxXpPerLevel(int pLevel) -
canLevelUp
public static boolean canLevelUp(int pLevel)
-