From b7104ceea16793a0507cb4a1ccfd07bc081a70ba Mon Sep 17 00:00:00 2001 From: Indyuce Date: Fri, 29 Oct 2021 20:04:43 +0200 Subject: [PATCH] on-hit abilities now trigger on any type of damage --- .../java/net/Indyuce/mmoitems/api/ItemAttackMetadata.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/main/java/net/Indyuce/mmoitems/api/ItemAttackMetadata.java b/src/main/java/net/Indyuce/mmoitems/api/ItemAttackMetadata.java index 178ac0f8..2693ac8f 100644 --- a/src/main/java/net/Indyuce/mmoitems/api/ItemAttackMetadata.java +++ b/src/main/java/net/Indyuce/mmoitems/api/ItemAttackMetadata.java @@ -47,10 +47,9 @@ public class ItemAttackMetadata extends AttackMetadata { * @return The unedited attack result */ public ItemAttackMetadata applyEffects(NBTItem item, LivingEntity target) { - if (getDamage().hasType(DamageType.WEAPON)) { + applyOnHitEffects(target); + if (getDamage().hasType(DamageType.WEAPON)) applyElementalEffects(item, target); - applyOnHitEffects(target); - } return this; }