From 368e9650255716a24878b7befa7b772bd2058e88 Mon Sep 17 00:00:00 2001 From: Sollace Date: Thu, 18 Feb 2021 22:57:55 +0200 Subject: [PATCH] Add a slight vertical jump to entities when performing a stomp --- .../unicopia/ability/EarthPonyStompAbility.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/main/java/com/minelittlepony/unicopia/ability/EarthPonyStompAbility.java b/src/main/java/com/minelittlepony/unicopia/ability/EarthPonyStompAbility.java index 597183cf..3c625469 100644 --- a/src/main/java/com/minelittlepony/unicopia/ability/EarthPonyStompAbility.java +++ b/src/main/java/com/minelittlepony/unicopia/ability/EarthPonyStompAbility.java @@ -96,9 +96,11 @@ public class EarthPonyStompAbility implements Ability { } inertia /= heavyness; + double liftAmount = Math.sin(Math.PI * dist / rad) * 12; + i.addVelocity( -(player.getX() - i.getX()) / inertia, - -(player.getY() - i.getY() - 2) / inertia + (dist < 1 ? dist : 0), + -(player.getY() - i.getY() - liftAmount) / inertia + (dist < 1 ? dist : 0), -(player.getZ() - i.getZ()) / inertia); DamageSource damage = MagicalDamageSource.create("smash", player);