@@ -243,7 +243,7 @@ public abstract class LivingEntityMixin_Attack_Impl extends EntityMixin implemen
243243 }
244244
245245 @ Inject (method = "actuallyHurt" , at = @ At (value = "INVOKE" ,target = "Lnet/minecraft/world/entity/LivingEntity;getDamageAfterArmorAbsorb(Lnet/minecraft/world/damagesource/DamageSource;F)F" ))
246- public void attackImpl$startActuallyHurt (DamageSource damageSource , float originalDamage , CallbackInfo ci ) {
246+ protected void attackImpl$startActuallyHurt (DamageSource damageSource , float originalDamage , CallbackInfo ci ) {
247247 // TODO check for direct call?
248248 this .attackImpl$actuallyHurt = new DamageEventUtil .ActuallyHurt ((LivingEntity ) (Object ) this , new ArrayList <>(), damageSource , originalDamage );
249249 }
@@ -254,7 +254,7 @@ public abstract class LivingEntityMixin_Attack_Impl extends EntityMixin implemen
254254 */
255255 @ Redirect (method = "getDamageAfterArmorAbsorb" ,
256256 at = @ At (value = "INVOKE" , target = "Lnet/minecraft/world/entity/LivingEntity;hurtArmor(Lnet/minecraft/world/damagesource/DamageSource;F)V" ))
257- public void attackImpl$onDamageAfterArmorAbsorb (final LivingEntity instance , final DamageSource $$0 , final float $$1 ) {
257+ protected void attackImpl$onDamageAfterArmorAbsorb (final LivingEntity instance , final DamageSource $$0 , final float $$1 ) {
258258 if (this .attackImpl$actuallyHurt != null ) {
259259 // prevents this.hurtArmor($$0, $$1);
260260 // $$1 = CombatRules.getDamageAfterAbsorb(this, $$1, $$0, (float)this.getArmorValue(), (float)this.getAttributeValue(Attributes.ARMOR_TOUGHNESS));
@@ -268,7 +268,7 @@ public abstract class LivingEntityMixin_Attack_Impl extends EntityMixin implemen
268268 */
269269 @ Inject (method = "getDamageAfterMagicAbsorb" ,
270270 at = @ At (value = "INVOKE" , target = "Lnet/minecraft/world/entity/LivingEntity;getEffect(Lnet/minecraft/core/Holder;)Lnet/minecraft/world/effect/MobEffectInstance;" ))
271- public void attackImpl$onDamageAfterMagicAbsorb (final DamageSource $$0 , final float $$1 , final CallbackInfoReturnable <Float > cir ) {
271+ protected void attackImpl$onDamageAfterMagicAbsorb (final DamageSource $$0 , final float $$1 , final CallbackInfoReturnable <Float > cir ) {
272272 if (this .attackImpl$actuallyHurt != null ) {
273273 var func = DamageEventUtil .createResistanceModifier (this .attackImpl$actuallyHurt .entity ());
274274 this .attackImpl$actuallyHurt .functions ().add (func );
@@ -281,7 +281,7 @@ public abstract class LivingEntityMixin_Attack_Impl extends EntityMixin implemen
281281 */
282282 @ Redirect (method = "getDamageAfterMagicAbsorb" ,
283283 at = @ At (value = "INVOKE" , target = "Lnet/minecraft/world/damagesource/CombatRules;getDamageAfterMagicAbsorb(FF)F" ))
284- public float attackImpl$onDetDamageProtection (final float damage , final float protection ) {
284+ protected float attackImpl$onDetDamageProtection (final float damage , final float protection ) {
285285 if (this .attackImpl$actuallyHurt != null ) {
286286 var func = DamageEventUtil .createEnchantmentModifiers (this .attackImpl$actuallyHurt .entity (), protection );
287287 this .attackImpl$actuallyHurt .functions ().add (func );
@@ -295,7 +295,7 @@ public abstract class LivingEntityMixin_Attack_Impl extends EntityMixin implemen
295295 * Then calls the DamageEntityEvent
296296 */
297297 @ Inject (method = "setAbsorptionAmount" , cancellable = true , at = @ At ("HEAD" ))
298- public void attackImpl$onSetAbsorptionAmount (final float newAmount , final CallbackInfo ci ) {
298+ protected void attackImpl$onSetAbsorptionAmount (final float newAmount , final CallbackInfo ci ) {
299299 if (this .attackImpl$actuallyHurt != null ) {
300300 ci .cancel (); // Always cancel this
301301 var oldAmount = this .shadow$getAbsorptionAmount ();
@@ -331,7 +331,7 @@ public abstract class LivingEntityMixin_Attack_Impl extends EntityMixin implemen
331331 @ ModifyVariable (method = "actuallyHurt" , ordinal = 0 ,
332332 at = @ At (value = "INVOKE" , target = "Lnet/minecraft/world/entity/LivingEntity;setAbsorptionAmount(F)V" ,
333333 ordinal = 0 , shift = At .Shift .AFTER ), argsOnly = true )
334- public float attackImpl$setFinalDamage (final float value ) {
334+ protected float attackImpl$setFinalDamage (final float value ) {
335335 if (this .attackImpl$actuallyHurtResult .event ().isCancelled ()) {
336336 return 0 ;
337337 }
@@ -388,7 +388,7 @@ public abstract class LivingEntityMixin_Attack_Impl extends EntityMixin implemen
388388 * also reverts {@link #attackImpl$beforeActuallyHurt}
389389 */
390390 @ Inject (method = "actuallyHurt" , at = @ At ("RETURN" ))
391- public void attackImpl$cleanupActuallyHurt (final DamageSource $$0 , final float $$1 , final CallbackInfo ci ) {
391+ protected void attackImpl$cleanupActuallyHurt (final DamageSource $$0 , final float $$1 , final CallbackInfo ci ) {
392392 this .attackImpl$handlePostDamage ();
393393 this .attackImpl$actuallyHurt = null ;
394394 this .attackImpl$actuallyHurtResult = null ;
0 commit comments