NoFall: Account for just moved distance for moving onto ground.

This commit is contained in:
asofold 2012-10-06 18:40:10 +02:00
parent 0dec258753
commit 660182f351

View File

@ -128,6 +128,7 @@ public class NoFall extends Check {
} }
else if (toOnGround){ else if (toOnGround){
// Check if to deal damage. // Check if to deal damage.
if (yDiff < 0) data.noFallFallDistance -= yDiff;
if (cc.noFallDealDamage) handleOnGround(mcPlayer, data, to.getY(), cc); if (cc.noFallDealDamage) handleOnGround(mcPlayer, data, to.getY(), cc);
else{ else{
mcPlayer.fallDistance = Math.max(mcPlayer.fallDistance, Math.max(data.noFallFallDistance, (float) (data.noFallMaxY - to.getY()))); mcPlayer.fallDistance = Math.max(mcPlayer.fallDistance, Math.max(data.noFallFallDistance, (float) (data.noFallMaxY - to.getY())));