Added getProfessionId() and setProfessionId(int id)
This commit is contained in:
parent
66be1f8fa9
commit
6b58c8ef5f
@ -17,9 +17,17 @@ public class VillagerWatcher extends AgeableWatcher {
|
||||
return Profession.values()[(Integer) getValue(16, 0)];
|
||||
}
|
||||
|
||||
public void setProfession(Profession newProfession) {
|
||||
setValue(16, newProfession.getId());
|
||||
public int getProfessionId() {
|
||||
return (Integer) getValue(16, 0);
|
||||
}
|
||||
|
||||
public void setProfessionId(int profession) {
|
||||
setValue(16, profession % 6);
|
||||
sendData(16);
|
||||
}
|
||||
|
||||
public void setProfession(Profession newProfession) {
|
||||
setProfessionId(newProfession.getId());
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user