diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java b/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java index 6f16cdaa..20b8eced 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Disguise.java @@ -46,6 +46,7 @@ public class Disguise { public Disguise clone() { Disguise disguise = new Disguise(getType(), replaceSounds()); + disguise.watcher = watcher.clone(); return disguise; } diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/FlagWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/FlagWatcher.java index b0ae5006..5a15fcf0 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/FlagWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/FlagWatcher.java @@ -36,6 +36,12 @@ public class FlagWatcher { protected FlagWatcher(int entityId) { this.entityId = entityId; } + + public FlagWatcher clone() { + FlagWatcher cloned = new FlagWatcher(entityId); + cloned.entityValues = (HashMap) entityValues.clone(); + return cloned; + } public List convert(List list) { Iterator itel = list.iterator(); diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ItemFrameWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ItemFrameWatcher.java index eeb8b03b..ca42e71a 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ItemFrameWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/ItemFrameWatcher.java @@ -9,8 +9,6 @@ public class ItemFrameWatcher extends FlagWatcher { public ItemFrameWatcher(int entityId) { super(entityId); - // setValue(2, CraftItemStack.asCraftCopy(new ItemStack(0))); - // setValue(3, (byte) 0); } public ItemStack getItemStack() { diff --git a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/LivingWatcher.java b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/LivingWatcher.java index 8925724d..ed86ae1b 100644 --- a/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/LivingWatcher.java +++ b/src/me/libraryaddict/disguise/DisguiseTypes/Watchers/LivingWatcher.java @@ -25,6 +25,12 @@ public class LivingWatcher extends FlagWatcher { sendPotionEffects(); } + public LivingWatcher clone() { + LivingWatcher clone = this.clone(); + clone.potionEffects = (HashSet) potionEffects.clone(); + return clone; + } + public String getCustomName() { return (String) getValue(10, ""); }