diff --git a/patches/net/minecraft/world/entity/LivingEntity.java.patch b/patches/net/minecraft/world/entity/LivingEntity.java.patch index e5fd781754..d666afcb68 100644 --- a/patches/net/minecraft/world/entity/LivingEntity.java.patch +++ b/patches/net/minecraft/world/entity/LivingEntity.java.patch @@ -243,15 +243,6 @@ this.lastHurtByPlayer = player; } else { this.lastHurtByPlayer = null; -@@ -1212,7 +_,7 @@ - if (this instanceof ServerPlayer) { - CriteriaTriggers.ENTITY_HURT_PLAYER.trigger((ServerPlayer)this, p_21016_, f, p_21017_, flag); - if (f1 > 0.0F && f1 < 3.4028235E37F) { -- ((ServerPlayer)this).awardStat(Stats.DAMAGE_BLOCKED_BY_SHIELD, Math.round(f1 * 10.0F)); -+ ((ServerPlayer)this).awardStat(Stats.CUSTOM.get(Stats.DAMAGE_BLOCKED_BY_SHIELD), Math.round(f1 * 10.0F)); - } - } - @@ -1220,6 +_,7 @@ CriteriaTriggers.PLAYER_HURT_ENTITY.trigger((ServerPlayer)entity, this, p_21016_, f, p_21017_, flag); } @@ -396,20 +387,14 @@ for (EquipmentSlot equipmentslot : p_331314_) { ItemStack itemstack = this.getItemBySlot(equipmentslot); if (itemstack.getItem() instanceof ArmorItem && itemstack.canBeHurtBy(p_330843_)) { -@@ -1648,10 +_,11 @@ +@@ -1648,6 +_,7 @@ p_21194_ = Math.max(f / 25.0F, 0.0F); float f2 = f1 - p_21194_; if (f2 > 0.0F && f2 < 3.4028235E37F) { + this.damageContainers.peek().setReduction(net.neoforged.neoforge.common.damagesource.DamageContainer.Reduction.MOB_EFFECTS, f2); if (this instanceof ServerPlayer) { -- ((ServerPlayer)this).awardStat(Stats.DAMAGE_RESISTED, Math.round(f2 * 10.0F)); -+ ((ServerPlayer)this).awardStat(Stats.CUSTOM.get(Stats.DAMAGE_RESISTED), Math.round(f2 * 10.0F)); + ((ServerPlayer)this).awardStat(Stats.DAMAGE_RESISTED, Math.round(f2 * 10.0F)); } else if (p_21193_.getEntity() instanceof ServerPlayer) { -- ((ServerPlayer)p_21193_.getEntity()).awardStat(Stats.DAMAGE_DEALT_RESISTED, Math.round(f2 * 10.0F)); -+ ((ServerPlayer)p_21193_.getEntity()).awardStat(Stats.CUSTOM.get(Stats.DAMAGE_DEALT_RESISTED), Math.round(f2 * 10.0F)); - } - } - } @@ -1670,6 +_,7 @@ if (f3 > 0.0F) {