Skip to main content

Overview

The BardsSpells class is responsible for registering and configuring all spells available in the Bards RPG mod. Each spell is defined as an Entry containing metadata, spell configuration, and optional tooltip customization.

Entry structure

Spells are registered using the Entry record class:
public record Entry(Identifier id, Spell spell, String title, String description,
                    @Nullable SpellTooltip.DescriptionMutator mutator) { }
id
Identifier
required
Unique identifier for the spell in the format bards_rpg:spell_name
spell
Spell
required
The spell configuration object containing all mechanics, targeting, delivery, and impact data
title
String
required
Display name of the spell shown to players
description
String
required
Template description supporting placeholders like {damage}, {bonus}, {amplifier_cap}, etc.
mutator
SpellTooltip.DescriptionMutator
Optional function to dynamically replace placeholder values in the description

Registered spells

Troubadour’s Minuet

ID: bards_rpg:troubadours_minuet Song that deals damage to enemies and reduces incoming damage, with stackable buff.
school
SpellSchools
ARCANE
range
int
5
tier
int
1
cast.duration
float
5.0
cast.movement_speed
float
1.5
cast.channel_ticks
int
10
cast.animation
String
bards_rpg:lute_channel
target.type
Spell.Target.Type
AREA
target.area.vertical_range_multiplier
float
1.5
target.area.include_caster
boolean
true
exhaust
float
0.2
cooldown
int
10 seconds
Impacts:
  • Damage: 0.5x spell power
  • Status effect: TROUBADOURS_MINUET (10 seconds duration, stackable up to 3 times)

Magical Ballad

ID: bards_rpg:magical_ballad Launches magical ballads that pierce through targets, dealing damage and buffing allies.
school
SpellSchools
ARCANE
range
int
20
tier
int
2
cast.duration
float
4.0
cast.movement_speed
float
1.5
cast.channel_ticks
int
20
cast.animation
String
bards_rpg:lute_channel
target.type
Spell.Target.Type
AIM
deliver.type
Spell.Delivery.Type
PROJECTILE
projectile.launch_properties.velocity
float
1.2
projectile.perks.pierce
int
3 targets
projectile.client_data.light_level
int
12
projectile.client_data.model.model_id
String
bards_rpg:projectile/magical_ballad
projectile.client_data.model.scale
float
2.0
projectile.hitbox
HitBox
1.8 x 1.8
exhaust
float
0.2
cooldown
int
10 seconds
Impacts:
  • Damage: 0.75x base + 1.0x spell power
  • Status effect: BALLAD (8 seconds duration, stackable up to 3 times)

Encore

ID: bards_rpg:encore Deals damage to nearby targets and reduces active spell cooldowns for allies.
school
SpellSchools
ARCANE
range
int
12
tier
int
3
cast.duration
float
0.5
cast.movement_speed
float
1.5
cast.animation
String
bards_rpg:lute_channel
release.animation
String
bards_rpg:lute_release
target.type
Spell.Target.Type
AREA
target.area.vertical_range_multiplier
float
0.5
target.area.include_caster
boolean
true
exhaust
float
0.2
cooldown
int
10 seconds
Impacts:
  • Damage: 0.6x base + 0.5x spell power
  • Cooldown reduction: 80% of remaining duration (20% reduction)

Army’s Paeon

ID: bards_rpg:armys_paeon Buffs nearby allies, enhancing their strength when you damage enemies. Effect is stackable.
school
SpellSchools
ARCANE
range
int
5
tier
int
4
release.animation
String
bards_rpg:lute_release
deliver.type
Spell.Delivery.Type
STASH_EFFECT
deliver.stash_effect.id
String
bards_rpg:armys_paeon
deliver.stash_effect.consume
int
0 (infinite triggers)
exhaust
float
0.2
cooldown
int
10 seconds
Triggers:
  • MELEE_IMPACT
  • ARROW_IMPACT
  • SPELL_IMPACT_SPECIFIC (active damage spells only)
Impacts:
  • Status effect: ARMYS_PAEON (8 seconds duration, stackable up to 3 times)

Army’s Paeon Impact

ID: bards_rpg:armys_paeon_impact Internal spell triggered by Army’s Paeon stash effect.
school
SpellSchools
ARCANE
range
int
0
tier
int
1
deliver.type
Spell.Delivery.Type
STASH_EFFECT
cooldown
int
1 second
Impacts:
  • Custom handler: bards_rpg:armies_paeon_impact

Utility functions

Trigger helpers

public static Spell.Trigger armiesPaeonMelee()
public static Spell.Trigger armiesPaeonRanged()
public static Spell.Trigger armiesPaeonSpell()
These functions create specialized triggers for Army’s Paeon that redirect target and AoE source to the caster.

Particle helpers

private static ParticleBatch musicParticles(Integer particleCount)
private static ParticleBatch musicImpactParticles(Integer particleCount)
Create music note particle effects for spell casting and impacts.

Color constants

GOLD
Color
0xffd700 - Used for Army’s Paeon
CYAN
Color
0x00ffff - Used for Encore
BRIGHT_GREEN
Color
0x8efea1 - Used for Troubadour’s Minuet

Usage example

import com.bards.content.BardsSpells;

// Access a registered spell
var minuet = BardsSpells.troubadours_minuet;
Identifier spellId = minuet.id();
Spell spellConfig = minuet.spell();
String displayName = minuet.title();

// Iterate all registered spells
for (var entry : BardsSpells.entries) {
    System.out.println(entry.title() + ": " + entry.description());
}