Fixed mob disguise adult code
This commit is contained in:
parent
a00514574b
commit
fb4ad42cfe
@ -50,7 +50,7 @@ public class Disguise {
|
|||||||
// Set the option to replace the sounds
|
// Set the option to replace the sounds
|
||||||
setReplaceSounds(doSounds);
|
setReplaceSounds(doSounds);
|
||||||
// Get if they are a adult now..
|
// Get if they are a adult now..
|
||||||
boolean isAdult = !(this instanceof MobDisguise && !((MobDisguise) this).isAdult());
|
boolean isBaby = !(this instanceof MobDisguise && ((MobDisguise) this).isAdult());
|
||||||
try {
|
try {
|
||||||
// Construct the FlagWatcher from the stored class
|
// Construct the FlagWatcher from the stored class
|
||||||
setWatcher((FlagWatcher) getType().getWatcherClass().getConstructor(Disguise.class).newInstance(this));
|
setWatcher((FlagWatcher) getType().getWatcherClass().getConstructor(Disguise.class).newInstance(this));
|
||||||
@ -58,7 +58,7 @@ public class Disguise {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
// Set the disguise if its a baby or not
|
// Set the disguise if its a baby or not
|
||||||
if (isAdult) {
|
if (isBaby) {
|
||||||
if (getWatcher() instanceof AgeableWatcher) {
|
if (getWatcher() instanceof AgeableWatcher) {
|
||||||
((AgeableWatcher) getWatcher()).setAdult(false);
|
((AgeableWatcher) getWatcher()).setAdult(false);
|
||||||
} else if (getWatcher() instanceof ZombieWatcher) {
|
} else if (getWatcher() instanceof ZombieWatcher) {
|
||||||
|
Loading…
Reference in New Issue
Block a user