on-hit abilities now trigger on any type of damage

This commit is contained in:
Indyuce 2021-10-29 20:04:43 +02:00
parent 6aabc21835
commit b7104ceea1

View File

@ -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;
}