mirror of
https://github.com/Sollace/Unicopia.git
synced 2025-02-20 03:44:23 +01:00
Fixed jittering disguises and fixed invisible changelings
This commit is contained in:
parent
42ad67dd52
commit
04145fa96a
1 changed files with 7 additions and 1 deletions
|
@ -37,6 +37,9 @@ public class SpellDisguise extends AbstractSpell {
|
||||||
}
|
}
|
||||||
|
|
||||||
public SpellDisguise setDisguise(@Nullable Entity entity) {
|
public SpellDisguise setDisguise(@Nullable Entity entity) {
|
||||||
|
if (entity == this.entity) {
|
||||||
|
entity = null;
|
||||||
|
}
|
||||||
this.entityNbt = null;
|
this.entityNbt = null;
|
||||||
|
|
||||||
if (this.entity != null) {
|
if (this.entity != null) {
|
||||||
|
@ -75,6 +78,8 @@ public class SpellDisguise extends AbstractSpell {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (entity != null) {
|
if (entity != null) {
|
||||||
|
|
||||||
|
|
||||||
if (entity instanceof EntityLiving) {
|
if (entity instanceof EntityLiving) {
|
||||||
EntityLiving l = (EntityLiving)entity;
|
EntityLiving l = (EntityLiving)entity;
|
||||||
|
|
||||||
|
@ -124,10 +129,11 @@ public class SpellDisguise extends AbstractSpell {
|
||||||
entity.distanceWalkedModified = owner.distanceWalkedModified;
|
entity.distanceWalkedModified = owner.distanceWalkedModified;
|
||||||
entity.prevDistanceWalkedModified = owner.prevDistanceWalkedModified;
|
entity.prevDistanceWalkedModified = owner.prevDistanceWalkedModified;
|
||||||
|
|
||||||
|
entity.updateBlocked = true;
|
||||||
|
|
||||||
owner.height = entity.height;
|
owner.height = entity.height;
|
||||||
|
|
||||||
entity.setSneaking(owner.isSneaking());
|
entity.setSneaking(owner.isSneaking());
|
||||||
|
|
||||||
entity.setInvisible(false);
|
entity.setInvisible(false);
|
||||||
|
|
||||||
if (source instanceof IPlayer) {
|
if (source instanceof IPlayer) {
|
||||||
|
|
Loading…
Reference in a new issue