Class VillagerData
- java.lang.Object
-
- net.minecraft.entity.merchant.villager.VillagerData
-
public class VillagerData extends java.lang.Object
-
-
Field Summary
Fields Modifier and Type Field Description static com.mojang.serialization.Codec<VillagerData>
CODEC
private int
level
private static int[]
NEXT_LEVEL_XP_THRESHOLDS
private VillagerProfession
profession
private VillagerType
type
-
Constructor Summary
Constructors Constructor Description VillagerData(VillagerType p_i50180_1_, VillagerProfession p_i50180_2_, int p_i50180_3_)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static boolean
canLevelUp(int p_221128_0_)
int
getLevel()
static int
getMaxXpPerLevel(int p_221127_0_)
static int
getMinXpPerLevel(int p_221133_0_)
VillagerProfession
getProfession()
VillagerType
getType()
VillagerData
setLevel(int p_221135_1_)
VillagerData
setProfession(VillagerProfession p_221126_1_)
VillagerData
setType(VillagerType p_221134_1_)
-
-
-
Field Detail
-
NEXT_LEVEL_XP_THRESHOLDS
private static final int[] NEXT_LEVEL_XP_THRESHOLDS
-
CODEC
public static final com.mojang.serialization.Codec<VillagerData> CODEC
-
type
private final VillagerType type
-
profession
private final VillagerProfession profession
-
level
private final int level
-
-
Constructor Detail
-
VillagerData
public VillagerData(VillagerType p_i50180_1_, VillagerProfession p_i50180_2_, int p_i50180_3_)
-
-
Method Detail
-
getType
public VillagerType getType()
-
getProfession
public VillagerProfession getProfession()
-
getLevel
public int getLevel()
-
setType
public VillagerData setType(VillagerType p_221134_1_)
-
setProfession
public VillagerData setProfession(VillagerProfession p_221126_1_)
-
setLevel
public VillagerData setLevel(int p_221135_1_)
-
getMinXpPerLevel
public static int getMinXpPerLevel(int p_221133_0_)
-
getMaxXpPerLevel
public static int getMaxXpPerLevel(int p_221127_0_)
-
canLevelUp
public static boolean canLevelUp(int p_221128_0_)
-
-