add require (#317)

This commit is contained in:
悠静萝莉 2021-07-06 22:28:03 +08:00 committed by GitHub
parent dd92ceb7c8
commit 9dbe8def69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,7 +24,7 @@ public abstract class WitherSkullEntityMixin extends DamagingProjectileEntityMix
((LivingEntityBridge) this.getShooter()).bridge$pushHealReason(EntityRegainHealthEvent.RegainReason.WITHER);
}
@Inject(method = "onEntityHit", at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/LivingEntity;addPotionEffect(Lnet/minecraft/potion/EffectInstance;)Z"))
@Inject(method = "onEntityHit", require = 0, at = @At(value = "INVOKE", target = "Lnet/minecraft/entity/LivingEntity;addPotionEffect(Lnet/minecraft/potion/EffectInstance;)Z"))
private void arclight$effect(EntityRayTraceResult result, CallbackInfo ci) {
((LivingEntityBridge) result.getEntity()).bridge$pushEffectCause(EntityPotionEffectEvent.Cause.ATTACK);
}