Added getProfessionId() and setProfessionId(int id)

This commit is contained in:
Andrew 2013-08-09 09:15:28 +12:00
parent 66be1f8fa9
commit 6b58c8ef5f

View File

@ -17,9 +17,17 @@ public class VillagerWatcher extends AgeableWatcher {
return Profession.values()[(Integer) getValue(16, 0)]; return Profession.values()[(Integer) getValue(16, 0)];
} }
public void setProfession(Profession newProfession) { public int getProfessionId() {
setValue(16, newProfession.getId()); return (Integer) getValue(16, 0);
}
public void setProfessionId(int profession) {
setValue(16, profession % 6);
sendData(16); sendData(16);
} }
public void setProfession(Profession newProfession) {
setProfessionId(newProfession.getId());
}
} }