public static enum Villager.Career extends java.lang.Enum<Villager.Career>
Villager.Profession
has a set of careers it is applicable to. Each
career dictates the trading options that are generated.枚举常量和说明 |
---|
ARMORER
Armorers primarily trade for iron armor, chainmail armor, and
sometimes diamond armor.
|
BUTCHER
Butchers primarily trade for raw and cooked food.
|
CARTOGRAPHER
Cartographers primarily trade for explorer maps and some paper.
|
CLERIC
Clerics primarily trade for rotten flesh, gold ingot, redstone,
lapis, ender pearl, glowstone, and bottle o' enchanting.
|
FARMER
Farmers primarily trade for food-related items.
|
FISHERMAN
Fisherman primarily trade for fish, as well as possibly selling
string and/or coal.
|
FLETCHER
Fletchers primarily trade for string, bows, and arrows.
|
LEATHERWORKER
Leatherworkers primarily trade for leather, and leather armor, as
well as saddles.
|
LIBRARIAN
Librarians primarily trade for paper, books, and enchanted books.
|
NITWIT
Nitwit villagers do not do anything.
|
SHEPHERD
Shepherds primarily trade for wool items, and shears.
|
TOOL_SMITH
Tool smiths primarily trade for iron and diamond tools.
|
WEAPON_SMITH
Weapon smiths primarily trade for iron and diamond weapons, sometimes
enchanted.
|
限定符和类型 | 方法和说明 |
---|---|
static java.util.List<Villager.Career> |
getCareers(Villager.Profession profession)
Get an immutable list of
Villager.Career s that can be used with a
given Villager.Profession |
Villager.Profession |
getProfession()
Get the
Villager.Profession this Villager.Career belongs to. |
static Villager.Career |
valueOf(java.lang.String name)
返回带有指定名称的该类型的枚举常量。
|
static Villager.Career[] |
values()
按照声明该枚举类型的常量的顺序, 返回
包含这些常量的数组。
|
public static final Villager.Career FARMER
public static final Villager.Career FISHERMAN
public static final Villager.Career SHEPHERD
public static final Villager.Career FLETCHER
public static final Villager.Career LIBRARIAN
public static final Villager.Career CARTOGRAPHER
public static final Villager.Career CLERIC
public static final Villager.Career ARMORER
public static final Villager.Career WEAPON_SMITH
public static final Villager.Career TOOL_SMITH
public static final Villager.Career BUTCHER
public static final Villager.Career LEATHERWORKER
public static final Villager.Career NITWIT
public static Villager.Career[] values()
for (Villager.Career c : Villager.Career.values()) System.out.println(c);
public static Villager.Career valueOf(java.lang.String name)
name
- 要返回的枚举常量的名称。java.lang.IllegalArgumentException
- 如果该枚举类型没有带有指定名称的常量java.lang.NullPointerException
- 如果参数为空值public Villager.Profession getProfession()
Villager.Profession
this Villager.Career
belongs to.Villager.Profession
.public static java.util.List<Villager.Career> getCareers(Villager.Profession profession)
Villager.Career
s that can be used with a
given Villager.Profession
profession
- the profession to get careers for