be a bit more lenient with blocked overcast damage

This commit is contained in:
yrsegal@gmail.com 2022-08-28 19:55:52 -04:00
parent cf03cc95b5
commit f7163127df

View file

@ -105,6 +105,7 @@ sealed class Mishap : Throwable() {
companion object {
fun trulyHurt(entity: LivingEntity, source: DamageSource, amount: Float) {
val targetHealth = entity.health - amount
if (entity.invulnerableTime > 10) {
val lastHurt = entity.lastHurt
if (lastHurt < amount)
@ -114,7 +115,7 @@ sealed class Mishap : Throwable() {
}
if (!entity.hurt(source, amount)) {
// Ok, if you REALLY don't want to play nice...
entity.health -= amount
entity.health = targetHealth
entity.markHurt()
if (entity.isDeadOrDying) {