From fff5d10f55a8c6a59f93cdbf4e7e6cd30ccf5849 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 3 Jun 2023 14:17:36 +0100 Subject: [PATCH] Fixed holding space causing the player to drift upwards whilst flying --- .../unicopia/entity/player/PlayerPhysics.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java index 41bbb585..0e5e5d5f 100644 --- a/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java +++ b/src/main/java/com/minelittlepony/unicopia/entity/player/PlayerPhysics.java @@ -36,6 +36,7 @@ import net.minecraft.particle.ParticleTypes; import net.minecraft.predicate.entity.EntityPredicates; import net.minecraft.sound.SoundCategory; import net.minecraft.sound.SoundEvents; +import net.minecraft.text.Text; import net.minecraft.util.math.*; import net.minecraft.world.event.GameEvent; @@ -289,6 +290,11 @@ public class PlayerPhysics extends EntityPhysics implements Tickab } else { strafe *= 0.28; } + + if (((LivingEntityDuck)entity).isJumping()) { + velocity.y -= 0.2F * getGravitySignum(); + velocity.y /= 2F; + } } else { prevStrafe = 0; strafe = 0;