Add method to see if the disguise ages

This commit is contained in:
Andrew 2013-07-23 06:37:15 +12:00
parent 573e307d19
commit 114a0fd285

View File

@ -21,6 +21,17 @@ public class MobDisguise extends Disguise {
return disguise;
}
public boolean doesDisguiseAge() {
if (getWatcher() != null) {
if (getWatcher() instanceof AgeableWatcher)
return ((AgeableWatcher) getWatcher()).isAdult();
else if (getWatcher() instanceof ZombieWatcher)
return ((ZombieWatcher) getWatcher()).isAdult();
}
return false;
}
public boolean equals(MobDisguise mobDisguise) {
return isAdult == mobDisguise.isAdult && this.equals(mobDisguise);
}