From a7d582f7cfe507f39468a2fe09d2dc75a5006d00 Mon Sep 17 00:00:00 2001 From: Sollace Date: Sat, 6 Apr 2019 21:07:54 +0200 Subject: [PATCH] Use the player's head position to control the vertical movement when rainbooming. Fixes #9 --- .../minelittlepony/unicopia/player/PlayerGravityDelegate.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/player/PlayerGravityDelegate.java b/src/main/java/com/minelittlepony/unicopia/player/PlayerGravityDelegate.java index 29a04f18..463ee6da 100644 --- a/src/main/java/com/minelittlepony/unicopia/player/PlayerGravityDelegate.java +++ b/src/main/java/com/minelittlepony/unicopia/player/PlayerGravityDelegate.java @@ -227,7 +227,7 @@ class PlayerGravityDelegate implements IUpdatable, IGravity, InbtSerialisable, I entity.motionX += - forward * MathHelper.sin(entity.rotationYaw * 0.017453292F); entity.motionZ += forward * MathHelper.cos(entity.rotationYaw * 0.017453292F); - entity.motionY += 0.3; + entity.motionY += forward * MathHelper.sin(entity.rotationPitch * 0.017453292F); if (!isRainbooming || entity.world.rand.nextInt(5) == 0) { entity.playSound(SoundEvents.ENTITY_LIGHTNING_THUNDER, 1, 1);