Improved the .clone of the disguises
This commit is contained in:
parent
8b26ab7f2a
commit
fb5dc6836a
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user