Flying entities disguised as non-flying entities should not fly

This commit is contained in:
Sollace 2022-10-13 20:24:22 +02:00
parent 3d27d10a8f
commit 8e436fa809

View file

@ -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) {