From 30da15647f2c0510f5dcb025deef945c576dcd4f Mon Sep 17 00:00:00 2001 From: md_5 Date: Mon, 9 Oct 2017 18:18:11 +1100 Subject: [PATCH] Fix zombie professions --- .../org/bukkit/craftbukkit/entity/CraftVillagerZombie.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java index b649374e42..6073d508c3 100644 --- a/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java +++ b/src/main/java/org/bukkit/craftbukkit/entity/CraftVillagerZombie.java @@ -29,11 +29,11 @@ public class CraftVillagerZombie extends CraftZombie implements ZombieVillager { @Override public Villager.Profession getVillagerProfession() { - return Villager.Profession.values()[getHandle().getProfession()]; + return Villager.Profession.values()[getHandle().getProfession() + Villager.Profession.FARMER.ordinal()]; } @Override public void setVillagerProfession(Villager.Profession profession) { - getHandle().setProfession(profession == null ? 0 : profession.ordinal()); + getHandle().setProfession(profession == null ? 0 : profession.ordinal() - Villager.Profession.FARMER.ordinal()); } }