From 2cdce6504c7268d9323e46debe12a6b119c14ee7 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sun, 19 May 2024 00:16:18 +0100 Subject: [PATCH] Only regenerate when the pegasus has reached the ground. Fixes #356 --- .../unicopia/entity/player/ManaContainer.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/player/ManaContainer.java b/src/main/java/com/minelittlepony/unicopia/entity/player/ManaContainer.java index c527430d..511e333d 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/player/ManaContainer.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/ManaContainer.java @@ -99,13 +99,13 @@ class ManaContainer implements MagicReserves, Tickable, NbtSerialisable, Copyabl energy.addPercent(-1); } - if (pony.getCompositeRace().canFly() && !pony.getPhysics().isFlying()) { - exhaustion.multiply(0.8F); + if (pony.getCompositeRace().canFly() && !pony.getPhysics().isFlying() && pony.asEntity().isOnGround()) { + exhaustion.multiply(0.99F); } else { exhaustion.addPercent(-1); } - if (!pony.getCompositeRace().canFly() || !pony.getPhysics().isFlying()) { + if (!pony.getCompositeRace().canFly() || (!pony.getPhysics().isFlying() && pony.asEntity().isOnGround())) { if (mana.getPercentFill() < 1 && mana.getShadowFill(1) <= mana.getPercentFill(1)) { mana.addPercent(MathHelper.clamp(1 + pony.getLevel().get(), 1, 50) / 4F); }