package squeek.quakemovement;

import api.player.server.ServerPlayerAPI;
import api.player.server.ServerPlayerBase;

public class QuakeServerPlayer extends ServerPlayerBase
{

	private boolean wasVelocityChangedBeforeFall = false;

	public QuakeServerPlayer(ServerPlayerAPI playerapi)
	{
		super(playerapi);
	}

	@Override
	public void fall(float fallDistance, float damageMultiplier)
	{
		wasVelocityChangedBeforeFall = this.playerAPI.getVelocityChangedField() || this.player.velocityChanged;

		if (ModConfig.INCREASED_FALL_DISTANCE != 0.0D)
		{
			fallDistance -= ModConfig.INCREASED_FALL_DISTANCE;
		}
		super.fall(fallDistance, fallDistance);

		this.playerAPI.setVelocityChangedField(wasVelocityChangedBeforeFall);
		this.player.velocityChanged = wasVelocityChangedBeforeFall;
	}
}

@@ -113,199 +113,741 @@
 se;%0A
-%0Apublic class QuakeServerPlayer extends ServerPlayerBase%0A%7B%0A%0A%09private boolean wasVelocityChangedBeforeFall = false;%0A%0A%09public QuakeServerPlayer(ServerPlayerAPI playerapi)%0A%09%7B%0A%09%09super(playerapi);
+import net.minecraft.entity.player.EntityPlayer;%0Aimport net.minecraftforge.common.MinecraftForge;%0Aimport net.minecraftforge.event.entity.living.LivingFallEvent;%0Aimport net.minecraftforge.fml.common.eventhandler.SubscribeEvent;%0A%0Apublic class QuakeServerPlayer extends ServerPlayerBase%0A%7B%0A%0A%09private boolean wasVelocityChangedBeforeFall = false;%0A%0A%09public QuakeServerPlayer(ServerPlayerAPI playerapi)%0A%09%7B%0A%09%09super(playerapi);%0A%0A%09%09MinecraftForge.EVENT_BUS.register(this);%0A%09%7D%0A%0A%09@SubscribeEvent%0A%09public void onLivingFall(LivingFallEvent event)%0A%09%7B%0A%09%09if (!(event.entity instanceof EntityPlayer))%0A%09%09%09return;%0A%0A%09%09if (ModConfig.INCREASED_FALL_DISTANCE != 0.0D)%0A%09%09%7B%0A%09%09%09event.distance = (float) (event.distance - ModConfig.INCREASED_FALL_DISTANCE);%0A%09%09%7D
 %0A%09%7D%0A
@@ -871,17 +871,23 @@
 ic void 
-f
+beforeF
 all(floa
@@ -1039,162 +1039,92 @@
 ed;%0A
-%0A%09%09if (ModConfig.INCREASED_FALL_DISTANCE != 0.0D)%0A%09%09%7B%0A%09%09%09fallDistance -= ModConfig.INCREASED_FALL_DISTANCE;%0A%09%09%7D%0A%09%09super.fall(fallDistance, fallDistance);%0A
+%09%7D%0A%0A%09@Override%0A%09public void afterFall(float fallDistance, float damageMultiplier)%0A%09%7B
 %0A%09%09t

Fix fall damage being applied wrong