Fixed stats for falling not being tracked correctly

This commit is contained in:
Sollace 2021-09-02 19:19:00 +02:00
parent ae1f49bd13
commit c4e102e74b

View file

@ -43,8 +43,8 @@ abstract class MixinPlayerEntity extends LivingEntity implements PonyContainer<P
get().onImpact(fallDistance, damageMultiplier, cause).ifPresent(newDistance -> {
PlayerEntity self = (PlayerEntity)(Object)this;
if (newDistance >= 2) {
self.increaseStat(Stats.FALL_ONE_CM, Math.round(newDistance * 100));
if (distance >= 2) {
self.increaseStat(Stats.FALL_ONE_CM, Math.round(distance * 100));
}
info.setReturnValue(super.handleFallDamage(newDistance, damageMultiplier, cause));