From 114a0fd2859ea077130cf1e22e2b46634c587ad8 Mon Sep 17 00:00:00 2001 From: Andrew Date: Tue, 23 Jul 2013 06:37:15 +1200 Subject: [PATCH] Add method to see if the disguise ages --- .../disguise/DisguiseTypes/MobDisguise.java | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/MobDisguise.java b/src/me/libraryaddict/disguise/DisguiseTypes/MobDisguise.java index 6c9c2bfd..521ac35d 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/MobDisguise.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/MobDisguise.java @@ -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); }