From 04145fa96a9f43e16da68d8901e737babae00fe8 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 3 Feb 2019 11:46:09 +0200 Subject: [PATCH] Fixed jittering disguises and fixed invisible changelings --- .../com/minelittlepony/unicopia/spell/SpellDisguise.java | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/spell/SpellDisguise.java b/src/main/java/com/minelittlepony/unicopia/spell/SpellDisguise.java index ac9f4be7..295b2fe9 100644 --- a/src/main/java/com/minelittlepony/unicopia/spell/SpellDisguise.java +++ b/src/main/java/com/minelittlepony/unicopia/spell/SpellDisguise.java @@ -37,6 +37,9 @@ public class SpellDisguise extends AbstractSpell { } public SpellDisguise setDisguise(@Nullable Entity entity) { + if (entity == this.entity) { + entity = null; + } this.entityNbt = null; if (this.entity != null) { @@ -75,6 +78,8 @@ public class SpellDisguise extends AbstractSpell { } if (entity != null) { + + if (entity instanceof EntityLiving) { EntityLiving l = (EntityLiving)entity; @@ -124,10 +129,11 @@ public class SpellDisguise extends AbstractSpell { entity.distanceWalkedModified = owner.distanceWalkedModified; entity.prevDistanceWalkedModified = owner.prevDistanceWalkedModified; + entity.updateBlocked = true; + owner.height = entity.height; entity.setSneaking(owner.isSneaking()); - entity.setInvisible(false); if (source instanceof IPlayer) {