Instead of migrating to Ranged Weapon API, ZenithAttributes should simply create its own implementation for AttributesLib's ARROW_DAMAGE in a compatible way.
ARROW_DAMAGE has slightly unexpected behavior/range, being indexed at 1.0 and functioning as a multiplier for arrow damage, unlike Projectile Damage/RangedWeapon API whose damage attributes are the total base value.
Arrow Damage modification is triggered with @ModifyVariable on setDamage in AbstractArrowMixin, passing in any original value
New component ARROW_DAMAGE_DONE is added to ensure damage modification is only applied once (I'm not actually sure this is necessary, or even how necessary the original ARROW_DONE is)
ARROW_DONE component renamed to ARROW_VELOCITY_DONE - old values should be ignored by CCA without issue
Removed Projectile Damage from project
Tested on skeletons and player, seems to work well
Instead of migrating to Ranged Weapon API, ZenithAttributes should simply create its own implementation for AttributesLib's
ARROW_DAMAGE
in a compatible way.ARROW_DAMAGE
has slightly unexpected behavior/range, being indexed at 1.0 and functioning as a multiplier for arrow damage, unlike Projectile Damage/RangedWeapon API whose damage attributes are the total base value.This discrepancy is the partial cause for https://github.com/muon-rw/Zephyr/issues/6 and https://github.com/TheWinABagel/Zenith/issues/169 due to the values of this affix
Implementation:
@ModifyVariable
on setDamage in AbstractArrowMixin, passing in any original valueARROW_DAMAGE_DONE
is added to ensure damage modification is only applied once (I'm not actually sure this is necessary, or even how necessary the original ARROW_DONE is)ARROW_DONE
component renamed toARROW_VELOCITY_DONE
- old values should be ignored by CCA without issueTested on skeletons and player, seems to work well