mirror of
https://github.com/TotalFreedomMC/TF-LibsDisguises.git
synced 2024-09-22 00:16:30 +00:00
Add the ability to set and get age in ageable watcher by number
This commit is contained in:
parent
95262097ca
commit
3e8532e6ff
|
@ -8,6 +8,10 @@ public class AgeableWatcher extends LivingWatcher {
|
||||||
super(disguise);
|
super(disguise);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public int getAge() {
|
||||||
|
return (Integer) getValue(12, 0);
|
||||||
|
}
|
||||||
|
|
||||||
public boolean isAdult() {
|
public boolean isAdult() {
|
||||||
return !isBaby();
|
return !isBaby();
|
||||||
}
|
}
|
||||||
|
@ -20,6 +24,11 @@ public class AgeableWatcher extends LivingWatcher {
|
||||||
setBaby(!isAdult);
|
setBaby(!isAdult);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void setAge(int newAge) {
|
||||||
|
setValue(12, newAge);
|
||||||
|
sendData(12);
|
||||||
|
}
|
||||||
|
|
||||||
public void setBaby(boolean isBaby) {
|
public void setBaby(boolean isBaby) {
|
||||||
setValue(12, isBaby ? -24000 : 0);
|
setValue(12, isBaby ? -24000 : 0);
|
||||||
sendData(12);
|
sendData(12);
|
||||||
|
|
Loading…
Reference in a new issue