Update to Minecraft 1.10

By: md_5 <git@md-5.net>
This commit is contained in:
Bukkit/Spigot
2016-06-09 11:43:40 +10:00
parent 44956ed250
commit 7d3852dda8
10 changed files with 91 additions and 89 deletions

View File

@@ -111,48 +111,36 @@ public interface Villager extends Ageable, NPC, InventoryHolder {
/**
* Represents the various different Villager professions there may be.
* Villagers have different trading options depending on their profession,
*/
public enum Profession {
FARMER(0),
LIBRARIAN(1),
PRIEST(2),
BLACKSMITH(3),
BUTCHER(4);
private static final Profession[] professions = new Profession[Profession.values().length];
private final int id;
static {
for (Profession type : values()) {
professions[type.getId()] = type;
}
}
private Profession(int id) {
this.id = id;
}
/**
* Gets the ID of this profession.
*
* @return Profession ID.
* @deprecated Magic value
* Villager without a profession.
*/
@Deprecated
public int getId() {
return id;
}
NORMAL,
/**
* Gets a profession by its ID.
*
* @param id ID of the profession to get.
* @return Resulting profession, or null if not found.
* @deprecated Magic value
* Farmer profession. Wears a brown robe.
*/
@Deprecated
public static Profession getProfession(int id) {
return (id >= professions.length) ? null : professions[id];
}
FARMER,
/**
* Librarian profession. Wears a white robe.
*/
LIBRARIAN,
/**
* Priest profession. Wears a purple robe.
*/
PRIEST,
/**
* Blacksmith profession. Wears a black apron.
*/
BLACKSMITH,
/**
* Butcher profession. Wears a white apron.
*/
BUTCHER,
/**
* Really a zombie.
*/
HUSK;
}
}