Add missing isSprinting check (#221)

This commit is contained in:
IzzelAliz 2021-04-25 15:09:49 +08:00
parent 215c962ba8
commit f57da77efb

View File

@ -280,6 +280,7 @@ public abstract class PlayerEntityMixin extends LivingEntityMixin implements Pla
flag2 = true;
}
boolean flag3 = flag && this.fallDistance > 0.0f && !this.onGround && !this.isOnLadder() && !this.isInWater() && !this.isPotionActive(Effects.BLINDNESS) && !this.isPassenger() && entity instanceof LivingEntity;
flag3 = flag3 && !this.isSprinting();
net.minecraftforge.event.entity.player.CriticalHitEvent hitResult = net.minecraftforge.common.ForgeHooks.getCriticalHit((PlayerEntity) (Object) this, entity, flag3, flag3 ? 1.5F : 1.0F);
flag3 = hitResult != null;
if (flag3) {