mirror of
https://github.com/KAMKEEL/CustomNPC-Plus.git
synced 2026-11-14 03:49:54 +00:00
Allow Externals to Modify Projectile Damage
This commit is contained in:
1 parent
44118ec770
commit
5edc9b5047
1 file changed
+11
@@ -959,6 +959,17 @@ public class AbilityController implements IAbilityHandler {
|
||||
return false;
|
||||
}
|
||||
|
||||
/**
|
||||
* Fire modifyProjectileDamage on all extenders. Cumulative — each extender's output feeds the next.
|
||||
*/
|
||||
public float fireModifyProjectileDamage(Ability ability, EntityLivingBase caster, float baseDamage) {
|
||||
float damage = baseDamage;
|
||||
for (IAbilityExtender ext : extenders) {
|
||||
damage = ext.modifyProjectileDamage(ability, caster, damage);
|
||||
}
|
||||
return damage;
|
||||
}
|
||||
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
// IAbilityHandler
|
||||
// ═══════════════════════════════════════════════════════════════════════════
|
||||
|
||||
Reference in new issue
Block a user