Abilities
Attach active and passive abilities to weapons. Planned for v0.2.0; hooks are already present in base classes.
Passive abilities
- Lifesteal — heal on hit
- Knockback — increased knockback strength
- Fire Aspect — fire damage over time
- Thorns — damage attackers
- Slow / Poison / Wither / Levitation — status effects on hit
Active abilities
- Dash — right-click teleport forward
- Chain Lightning — jumps to nearby entities on hit
- Explosive — AoE explosion on hit
- Freeze — applies slowness on hit
Hooks
public class Stormcaller extends ArmariaMeleeWeapon {
public Stormcaller(Properties props) {
super(props);
addPassiveAbility(Abilities.LIFESTEAL, 0.15f);
addAbility(Abilities.CHAIN_LIGHTNING, 4, 5.0f, 0.8f);
setTexture(Texture2D.of("armaria:item/stormcaller"));
}
@Override
public void postHurtEnemy(ItemStack stack, LivingEntity target, LivingEntity attacker) {
VFXPresets.stormChain(attacker, InteractionHand.MAIN_HAND);
}
}
Cooldowns and mana
Use the existing charge system as a mana proxy, and track cooldowns in ticks inside your weapon class.
Status
The ability registry and helper methods are planned for v0.2.0. The
onChargeFull and postHurtEnemy hooks already exist and can be used today.