接口 Villager.Profession
- 封闭接口:
- Villager
public static interface Villager.Profession
extends OldEnum<Villager.Profession>, Keyed, RegistryAware
Represents the various different Villager professions there may be.
Villagers have different trading options depending on their profession,
-
字段概要
字段修饰符和类型字段说明static final Villager.ProfessionArmorer profession.static final Villager.ProfessionButcher profession.static final Villager.ProfessionCartographer profession.static final Villager.ProfessionCleric profession.static final Villager.ProfessionFarmer profession.static final Villager.ProfessionFisherman profession.static final Villager.ProfessionFletcher profession.static final Villager.ProfessionLeatherworker profession.static final Villager.ProfessionLibrarian profession.static final Villager.ProfessionMason profession.static final Villager.ProfessionNitwit profession.static final Villager.Professionstatic final Villager.ProfessionSheperd profession.static final Villager.ProfessionToolsmith profession.static final Villager.ProfessionWeaponsmith profession. -
方法概要
修饰符和类型方法说明getKey()已过时。static @NotNull Villager.Profession已过时。only for backwards compatibility, useRegistry.get(NamespacedKey)instead.static @NotNull Villager.Profession[]values()已过时。useIterable.iterator().从接口继承的方法 org.bukkit.registry.RegistryAware
getKeyOrNull, getKeyOrThrow, isRegistered
-
字段详细资料
-
NONE
-
ARMORER
Armorer profession. Wears a black apron. Armorers primarily trade for iron armor, chainmail armor, and sometimes diamond armor. -
BUTCHER
Butcher profession. Wears a white apron. Butchers primarily trade for raw and cooked food. -
CARTOGRAPHER
Cartographer profession. Wears a white robe. Cartographers primarily trade for explorer maps and some paper. -
CLERIC
Cleric profession. Wears a purple robe. Clerics primarily trade for rotten flesh, gold ingot, redstone, lapis, ender pearl, glowstone, and bottle o' enchanting. -
FARMER
Farmer profession. Wears a brown robe. Farmers primarily trade for food-related items. -
FISHERMAN
Fisherman profession. Wears a brown robe. Fisherman primarily trade for fish, as well as possibly selling string and/or coal. -
FLETCHER
Fletcher profession. Wears a brown robe. Fletchers primarily trade for string, bows, and arrows. -
LEATHERWORKER
Leatherworker profession. Wears a white apron. Leatherworkers primarily trade for leather, and leather armor, as well as saddles. -
LIBRARIAN
Librarian profession. Wears a white robe. Librarians primarily trade for paper, books, and enchanted books. -
MASON
Mason profession. -
NITWIT
Nitwit profession. Wears a green apron, cannot trade. Nitwit villagers do not do anything. They do not have any trades by default. -
SHEPHERD
Sheperd profession. Wears a brown robe. Shepherds primarily trade for wool items, and shears. -
TOOLSMITH
Toolsmith profession. Wears a black apron. Tool smiths primarily trade for iron and diamond tools. -
WEAPONSMITH
Weaponsmith profession. Wears a black apron. Weapon smiths primarily trade for iron and diamond weapons, sometimes enchanted.
-
-
方法详细资料
-
getKey
已过时。A key might not always be present, useRegistryAware.getKeyOrThrow()instead.返回用于此对象的命名空间标识符.原文:Return the namespaced identifier for this object.
-
valueOf
@NotNull @Deprecated(since="1.21") static @NotNull Villager.Profession valueOf(@NotNull @NotNull String name) 已过时。only for backwards compatibility, useRegistry.get(NamespacedKey)instead.- 参数:
name- of the villager profession.- 返回:
- the villager profession with the given name.
-
values
已过时。useIterable.iterator().- 返回:
- an array of all known villager professions.
-
RegistryAware.getKeyOrThrow()instead.