From 8e436fa809a6b967468c9701d088114d35b4d73d Mon Sep 17 00:00:00 2001 From: Sollace Date: Thu, 13 Oct 2022 20:24:22 +0200 Subject: [PATCH] Flying entities disguised as non-flying entities should not fly --- .../minelittlepony/unicopia/entity/behaviour/Disguise.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/behaviour/Disguise.java b/src/main/java/com/minelittlepony/unicopia/entity/behaviour/Disguise.java index 63f933e8..f315f994 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/behaviour/Disguise.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/behaviour/Disguise.java @@ -7,6 +7,7 @@ import org.jetbrains.annotations.Nullable; import com.minelittlepony.unicopia.FlightType; import com.minelittlepony.unicopia.Owned; import com.minelittlepony.unicopia.ability.magic.Caster; +import com.minelittlepony.unicopia.entity.duck.LivingEntityDuck; import com.minelittlepony.unicopia.entity.player.PlayerDimensions; import com.minelittlepony.unicopia.entity.player.Pony; @@ -92,6 +93,10 @@ public interface Disguise extends FlightType.Provider, PlayerDimensions.Provider entity.tick(); } + if (!(owner instanceof PlayerEntity) && !((LivingEntityDuck)owner).isJumping()) { + owner.addVelocity(0, -0.09, 0); + } + behaviour.update(source, entity, this); if (source instanceof Pony) {