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>
CODEC
private int
level
private static int[]
LEVEL_BASE_EXPERIENCE
private VillagerProfession
profession
private VillagerType
type
-
Constructor Summary
Constructors Constructor Description VillagerData(VillagerType villagerType, VillagerProfession villagerProfession, int int2)
-
Method Summary
Modifier and Type Method Description static boolean
canLevelUp(int level)
int
getLevel()
static int
getLowerLevelExperience(int level)
VillagerProfession
getProfession()
VillagerType
getType()
static int
getUpperLevelExperience(int level)
VillagerData
withLevel(int level)
VillagerData
withProfession(VillagerProfession villagerProfession)
VillagerData
withType(VillagerType villagerType)
-
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)
-