Improved the .clone of the disguises

This commit is contained in:
Andrew 2013-11-06 03:53:30 +13:00
parent 8b26ab7f2a
commit fb5dc6836a
3 changed files with 17 additions and 0 deletions

View File

@ -55,6 +55,11 @@ public class Disguise {
public Disguise clone() {
Disguise disguise = new Disguise().createDisguise(getType(), replaceSounds());
disguise.setViewSelfDisguise(viewSelfDisguise());
disguise.setHearSelfDisguise(canHearSelfDisguise());
disguise.setHideArmorFromSelf(isHidingArmorFromSelf());
disguise.setHideHeldItemFromSelf(isHidingHeldItemFromSelf());
disguise.setVelocitySent(isVelocitySent());
disguise.setWatcher(getWatcher().clone());
return disguise;
}

View File

@ -56,6 +56,12 @@ public class MiscDisguise extends Disguise {
public MiscDisguise clone() {
MiscDisguise disguise = new MiscDisguise(getType(), replaceSounds(), getId(), getData());
disguise.setViewSelfDisguise(viewSelfDisguise());
disguise.setHearSelfDisguise(canHearSelfDisguise());
disguise.setHideArmorFromSelf(isHidingArmorFromSelf());
disguise.setHideHeldItemFromSelf(isHidingHeldItemFromSelf());
disguise.setVelocitySent(isVelocitySent());
disguise.setWatcher(getWatcher().clone());
return disguise;
}

View File

@ -40,6 +40,12 @@ public class MobDisguise extends Disguise {
public MobDisguise clone() {
MobDisguise disguise = new MobDisguise(getType(), isAdult(), replaceSounds());
disguise.setViewSelfDisguise(viewSelfDisguise());
disguise.setHearSelfDisguise(canHearSelfDisguise());
disguise.setHideArmorFromSelf(isHidingArmorFromSelf());
disguise.setHideHeldItemFromSelf(isHidingHeldItemFromSelf());
disguise.setVelocitySent(isVelocitySent());
disguise.setWatcher(getWatcher().clone());
return disguise;
}