添加防弹衣对穿甲伤害的防护
This commit is contained in:
parent
e5e63f80b0
commit
01bb152447
1 changed files with 1 additions and 1 deletions
|
@ -91,7 +91,7 @@ public class LivingEventHandler {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (damageSource.is(ModTags.DamageTypes.PROJECTILE_ABSOLUTE)) {
|
if (damageSource.is(ModTags.DamageTypes.PROJECTILE_ABSOLUTE)) {
|
||||||
// TODO 添加对于穿透伤害的处理
|
damage = damage * (1 - 0.2 * Mth.clamp(entity.getAttributeValue(ModAttributes.BULLET_RESISTANCE.get()), 0, 1));
|
||||||
}
|
}
|
||||||
|
|
||||||
event.setAmount((float) damage);
|
event.setAmount((float) damage);
|
||||||
|
|
Loading…
Add table
Reference in a new issue