public class VillagerData extends Object
Modifier and Type | Field and Description |
---|---|
static com.mojang.serialization.Codec<VillagerData> |
CODEC |
private int |
level |
private static int[] |
LEVEL_BASE_EXPERIENCE |
private VillagerProfession |
profession |
private VillagerType |
type |
Constructor and Description |
---|
VillagerData(VillagerType villagerType,
VillagerProfession villagerProfession,
int int2) |
Modifier and Type | Method and 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) |
private static final int[] LEVEL_BASE_EXPERIENCE
public static final com.mojang.serialization.Codec<VillagerData> CODEC
private final VillagerType type
private final VillagerProfession profession
private final int level
public VillagerData(VillagerType villagerType, VillagerProfession villagerProfession, int int2)
public VillagerType getType()
public VillagerProfession getProfession()
public int getLevel()
public VillagerData withType(VillagerType villagerType)
public VillagerData withProfession(VillagerProfession villagerProfession)
public VillagerData withLevel(int level)
@Environment(value=CLIENT) public static int getLowerLevelExperience(int level)
public static int getUpperLevelExperience(int level)
public static boolean canLevelUp(int level)