Specify effect source as attacker in Wither Steel Sword

This commit is contained in:
DBotThePony 2025-03-09 16:22:11 +07:00
parent df7465a59f
commit f1c87ed5ad
Signed by: DBot
GPG Key ID: DCC23B5715498507

View File

@ -38,7 +38,7 @@ class WitheredSteelSwordItem(properties: Properties) : SwordItem(Tiers.IRON, pro
override fun hurtEnemy(stack: ItemStack, target: LivingEntity, attacker: LivingEntity): Boolean {
val status = super.hurtEnemy(stack, target, attacker)
if (status) target.addEffect(MobEffectInstance(MobEffects.WITHER, 100, 0))
if (status) target.addEffect(MobEffectInstance(MobEffects.WITHER, 100, 0), attacker)
return status
}