Specify effect source as attacker in Wither Steel Sword
This commit is contained in:
parent
df7465a59f
commit
f1c87ed5ad
@ -38,7 +38,7 @@ class WitheredSteelSwordItem(properties: Properties) : SwordItem(Tiers.IRON, pro
|
|||||||
|
|
||||||
override fun hurtEnemy(stack: ItemStack, target: LivingEntity, attacker: LivingEntity): Boolean {
|
override fun hurtEnemy(stack: ItemStack, target: LivingEntity, attacker: LivingEntity): Boolean {
|
||||||
val status = super.hurtEnemy(stack, target, attacker)
|
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
|
return status
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user