Clone de watcher her hitler!
This commit is contained in:
parent
5eca9c9d12
commit
996fe4a31e
@ -46,6 +46,7 @@ public class Disguise {
|
|||||||
|
|
||||||
public Disguise clone() {
|
public Disguise clone() {
|
||||||
Disguise disguise = new Disguise(getType(), replaceSounds());
|
Disguise disguise = new Disguise(getType(), replaceSounds());
|
||||||
|
disguise.watcher = watcher.clone();
|
||||||
return disguise;
|
return disguise;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -36,6 +36,12 @@ public class FlagWatcher {
|
|||||||
protected FlagWatcher(int entityId) {
|
protected FlagWatcher(int entityId) {
|
||||||
this.entityId = entityId;
|
this.entityId = entityId;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public FlagWatcher clone() {
|
||||||
|
FlagWatcher cloned = new FlagWatcher(entityId);
|
||||||
|
cloned.entityValues = (HashMap<Integer, Object>) entityValues.clone();
|
||||||
|
return cloned;
|
||||||
|
}
|
||||||
|
|
||||||
public List<WatchableObject> convert(List<WatchableObject> list) {
|
public List<WatchableObject> convert(List<WatchableObject> list) {
|
||||||
Iterator<WatchableObject> itel = list.iterator();
|
Iterator<WatchableObject> itel = list.iterator();
|
||||||
|
@ -9,8 +9,6 @@ public class ItemFrameWatcher extends FlagWatcher {
|
|||||||
|
|
||||||
public ItemFrameWatcher(int entityId) {
|
public ItemFrameWatcher(int entityId) {
|
||||||
super(entityId);
|
super(entityId);
|
||||||
// setValue(2, CraftItemStack.asCraftCopy(new ItemStack(0)));
|
|
||||||
// setValue(3, (byte) 0);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public ItemStack getItemStack() {
|
public ItemStack getItemStack() {
|
||||||
|
@ -25,6 +25,12 @@ public class LivingWatcher extends FlagWatcher {
|
|||||||
sendPotionEffects();
|
sendPotionEffects();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public LivingWatcher clone() {
|
||||||
|
LivingWatcher clone = this.clone();
|
||||||
|
clone.potionEffects = (HashSet<MobEffect>) potionEffects.clone();
|
||||||
|
return clone;
|
||||||
|
}
|
||||||
|
|
||||||
public String getCustomName() {
|
public String getCustomName() {
|
||||||
return (String) getValue(10, "");
|
return (String) getValue(10, "");
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user