mirror of
https://github.com/libraryaddict/LibsDisguises.git
synced 2024-12-16 15:38:14 +01:00
Added setBaby and isBaby to zombiewatcher. Deprecated setadult for ageable and zombie watcher
This commit is contained in:
parent
bd83ff0c80
commit
40694c5030
@ -12,6 +12,7 @@ public class AgeableWatcher extends LivingWatcher {
|
||||
return (Integer) getValue(12, 0);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public boolean isAdult() {
|
||||
return !isBaby();
|
||||
}
|
||||
@ -20,6 +21,7 @@ public class AgeableWatcher extends LivingWatcher {
|
||||
return (Integer) getValue(12, 0) < 0;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setAdult(boolean isAdult) {
|
||||
setBaby(!isAdult);
|
||||
}
|
||||
|
@ -8,16 +8,26 @@ public class ZombieWatcher extends LivingWatcher {
|
||||
super(disguise);
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public boolean isAdult() {
|
||||
return (Byte) getValue(12, (byte) 0) == 0;
|
||||
}
|
||||
|
||||
public boolean isBaby() {
|
||||
return (Byte) getValue(12, (byte) 0) == 1;
|
||||
}
|
||||
|
||||
public boolean isVillager() {
|
||||
return (Byte) getValue(13, (byte) 0) == 1;
|
||||
}
|
||||
|
||||
@Deprecated
|
||||
public void setAdult(boolean adult) {
|
||||
setValue(12, (byte) (adult ? 0 : 1));
|
||||
setBaby(!adult);
|
||||
}
|
||||
|
||||
public void setBaby(boolean baby) {
|
||||
setValue(12, (byte) (baby ? 1 : 0));
|
||||
sendData(12);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user