mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-16 15:38:14 +01:00
Add isBaby and setBaby to ageable watcher
This commit is contained in:
parent
40c41fe1d0
commit
f5c48eb264
@ -9,12 +9,20 @@ public class AgeableWatcher extends LivingWatcher {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public boolean isAdult() {
|
public boolean isAdult() {
|
||||||
|
return !isBaby();
|
||||||
|
}
|
||||||
|
|
||||||
|
public boolean isBaby() {
|
||||||
return (Integer) getValue(12, 0) >= 0;
|
return (Integer) getValue(12, 0) >= 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
public void setAdult(boolean isAdult) {
|
public void setBaby(boolean isBaby) {
|
||||||
setValue(12, isAdult ? 0 : -24000);
|
setValue(12, isBaby ? 0 : -24000);
|
||||||
sendData(12);
|
sendData(12);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAdult(boolean isAdult) {
|
||||||
|
setBaby(!isAdult);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user