From fb5dc6836a3a9a2578e04e90aa7c34466c7a475b Mon Sep 17 00:00:00 2001 From: Andrew Date: Wed, 6 Nov 2013 03:53:30 +1300 Subject: [PATCH] Improved the .clone of the disguises --- src/me/libraryaddict/disguise/disguisetypes/Disguise.java | 5 +++++ .../libraryaddict/disguise/disguisetypes/MiscDisguise.java | 6 ++++++ .../libraryaddict/disguise/disguisetypes/MobDisguise.java | 6 ++++++ 3 files changed, 17 insertions(+) diff --git a/src/me/libraryaddict/disguise/disguisetypes/Disguise.java b/src/me/libraryaddict/disguise/disguisetypes/Disguise.java index d56b3773..3c7fc5a5 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/Disguise.java +++ b/src/me/libraryaddict/disguise/disguisetypes/Disguise.java @@ -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; } diff --git a/src/me/libraryaddict/disguise/disguisetypes/MiscDisguise.java b/src/me/libraryaddict/disguise/disguisetypes/MiscDisguise.java index dfff4182..d6d50e8d 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/MiscDisguise.java +++ b/src/me/libraryaddict/disguise/disguisetypes/MiscDisguise.java @@ -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; } diff --git a/src/me/libraryaddict/disguise/disguisetypes/MobDisguise.java b/src/me/libraryaddict/disguise/disguisetypes/MobDisguise.java index 64f687bb..1ff5a9c0 100644 --- a/src/me/libraryaddict/disguise/disguisetypes/MobDisguise.java +++ b/src/me/libraryaddict/disguise/disguisetypes/MobDisguise.java @@ -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; }