Package net.minecraft.village
Class VillagerData
java.lang.Object
net.minecraft.village.VillagerData
public class VillagerData extends Object
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.serialization.Codec<VillagerData>CODECprivate intlevelprivate static int[]LEVEL_BASE_EXPERIENCEprivate VillagerProfessionprofessionprivate VillagerTypetype -
Constructor Summary
Constructors Constructor Description VillagerData(VillagerType type, VillagerProfession profession, int level) -
Method Summary
Modifier and Type Method Description static booleancanLevelUp(int level)intgetLevel()static intgetLowerLevelExperience(int level)VillagerProfessiongetProfession()VillagerTypegetType()static intgetUpperLevelExperience(int level)VillagerDatawithLevel(int level)VillagerDatawithProfession(VillagerProfession profession)VillagerDatawithType(VillagerType type)
-
Field Details
-
LEVEL_BASE_EXPERIENCE
private static final int[] LEVEL_BASE_EXPERIENCE -
CODEC
-
type
-
profession
-
level
private final int level
-
-
Constructor Details
-
VillagerData
-
-
Method Details
-
getType
-
getProfession
-
getLevel
public int getLevel() -
withType
-
withProfession
-
withLevel
-
getLowerLevelExperience
@Environment(CLIENT) public static int getLowerLevelExperience(int level) -
getUpperLevelExperience
public static int getUpperLevelExperience(int level) -
canLevelUp
public static boolean canLevelUp(int level)
-