Targeting
Skills filter which entities they affect through a targeting system based on caster type, target type, and relationship rules. The targets key determines which entities are valid, and impact-specific or projectile-specific caps determine how many of those valid targets are actually hit.
Relationship Types
The targets field accepts five relationship types, defined by the SubjectTypes enum:
Type | Selects | Aliases |
|---|---|---|
| Only the caster (by | lowercase |
| Valid enemies based on caster type. | lowercase |
| Valid allies based on caster type. | lowercase |
| Every entity in the world (no filtering). | lowercase |
| Every entity except the caster. | lowercase |
Configurate deserializes both uppercase and lowercase enum names, so targets: enemy and targets: ENEMY are equivalent.
Relationship Rules
The caster's entity type determines who counts as an ally or enemy:
Player caster
Enemies → mobs and other hostile entities (not other players)
Allies → other players (not mobs)
Mob/entity caster
Enemies → players (not other mobs)
Allies → other mobs and entities of the same type (not players)
In both cases, an entity cannot be an enemy to itself; SELF matches only the caster by entityId. To exclude the caster but include everything else, use ALL_BUT_SELF.
Impact Selection
Impact skills use two parameters to select which valid targets are hit:
Parameter | Type | Default | Description |
|---|---|---|---|
| integer |
| Maximum entities to affect per impact. |
| boolean |
| If |
Example: single-target heal
The impact searches for allies within the hitbox, then applies the heal to only 1 entity (closest first, since hit-randomly: false).
Example: telegraph/windup display
The affect-limit: 0 means no entities are damaged, but the particle ring still renders at the impact location — a visual telegraph of where damage will occur (used by mob attacks like the creeper-ring and warden-potion-effect).
Projectile Selection
Projectile skills track which entities they pierce through:
Parameter | Type | Default | Description |
|---|---|---|---|
| integer |
| Number of entities the projectile can pass through before stopping. Each entity is only hit once, tracked by UUID. |
When a projectile strikes a valid target, it:
Checks if the target's UUID is in the
piercedEntityIdslist for this projectile.If not, increments the
entitiesPiercedcounter and adds the UUID.Triggers
cast-skill-on-entityfor that target.If
entitiesPierced >= piercingAmount, marks the projectile as expired and stops traveling.
Example: multi-target projectile
The projectile travels until it has hit 10 entities, then expires. Each hit triggers one of two follow-up skills depending on whether the hit entity is an ally or enemy.
Cast Effects vs Target Effects
Skills distinguish between effects applied to the caster and effects applied to affected entities:
cast-effects→ applied to the caster when the skill is cast (e.g., knockback to the caster, velocity boost, shield grant).target-effects→ applied to each entity hit by the skill (e.g., potion effects, damage, healing).
See Effects for the full reference.
Example: caster and target effects
Cast effects apply to the caster: velocity boost forward and shield resource grant.
Target effects apply to each enemy hit: darkness potion effect.
Hit enemies also take
100.0damage (specified bydamageinparams).
Common Patterns
Enemy damage impact
Single-target or area damage to enemies:
Ally heal area
Heal multiple allies within range:
Branching projectile (ally/enemy logic)
A projectile that hits both allies and enemies, then triggers different follow-up skills:
Each follow-up skill has its own targets filter, so my-skill-ally-branch can use targets: ALLY and my-skill-enemy-branch can use targets: enemy.
Windup telegraph
Display a visual warning without dealing damage:
Used by mob attacks (e.g., creeper-ring-red, warden-potion-effect) to signal the area that will be damaged in a follow-up impact or explosion.