Skip to main content

Module wave

Module wave 

Source
Expand description

Waves: the mobs a fight spawns, their lanes, equipment, drops and attributes.

Structs§

EnchantedItem
The enchanted form of EquipItem.
ItemDrop
The quest-token form of a MobDrop.
MobAttributes
Attribute overrides for a wave mob (DSL v0.4). Each field maps to a 1.21.11 minecraft: attribute component; an unset field keeps the vanilla base value.
MobEffect
One permanent status effect on a wave mob (DSL v0.4), emitted as an ambient, non-expiring effect give.
MobEquipment
Worn/held equipment for a wave mob (DSL v0.6). Each field is a vanilla item id for the matching vanilla equipment slot; an unset slot stays empty — except main_hand, where the compiler’s armed-mob default (skeleton bow, wither-skeleton sword) still applies unless overridden. Emitted as the component-era equipment/drop_chances summon NBT (1.21.11 silently ignores legacy ArmorItems/HandItems on /summon), all drop chances 0.
SlotDrop
The worn-piece form of a MobDrop.
Wave
A combat wave (DSL v0.3): a bundle of mobs spawned at an anchor and slain to complete a kill objective. Emission (spec-0002): a spawn-wave effect summons the mobs tagged dw_wave_<id> (AI enabled — they fight); a player_killed_entity advancement per tag decrements a scoreboard countdown, and the kill objective completes when the count reaches zero.
WaveLane
Tower-defense lane routing for a wave (spec-0016 §6), built on vanilla’s Raider patrol system — the intended primitive, live-verified on 1.21.11 (docs/notes/td-routing-spike.md).
WaveMob
One mob stack in a Wave.

Enums§

EncounterTier
What a wave is billed as (DSL v0.7, spec-0023). Consumed by the validation ladder (the run’s combat plan) and — since spec-0016 §1’s undefeated re-seat — by one emission site: a bonfire refreshes a billed wave that is still standing. Nothing about the encounter itself is scaled from it.
EquipItem
One equipped item: either a bare item id, or an id carrying enchantments.
EquipSlot
One vanilla equipment slot, named exactly as the MobEquipment field that fills it. The DSL name and the summon-NBT key differ (main_hand vs mainhand), so both live here and nowhere else.
MobDrop
One declared drop of an elite or boss (DSL v0.9).
WaveSummon
Where a wave’s mobs materialize (spec-0016 §6).

Constants§

AGGRO_EDGE_NO_RANGE
(spec-0016 §6) A summon: aggro-edge wave mob declares no attributes.follow_range. That radius IS the summon ring — the distance at which the mob perceives the party — so it is authored, never guessed from a vanilla defaults table the compiler cannot verify.
BOSS_RESPAWNS_ON_REST
(spec-0016 §1, spec-0023, souls ruling 5/7: “stage bosses never respawn on rest”) A wave declares BOTH tier: boss and respawns_on_rest: true. tier and respawns_on_rest are two fields on the same Wave declaration — the only place a “boss” billing and a “re-seat on rest” contract can land on one another; an Actor carries tier too but has no respawns_on_rest field at all (it is killed by hand, never re-seated by a bonfire), so this is the sole structurally expressible violation of the ruling. A rest-respawning boss re-fight breaks the retry economy the ruling exists to protect: a boss is the campaign’s named fight, not trash pressure the party grinds back down every rest. Validation-tier (exit 1), dsl::validate. Prescription: drop tier: boss if the encounter really is meant to re-seat (bill it elite instead), or drop respawns_on_rest if it really is the boss.
DIFFICULTY_UNDECLARED_ACTORS
(v0.6) A campaign stages actors meant to fight — unleashed, or declared vulnerable — but declares no world.difficulty, and the engine’s derivation (crate::derived_difficulty) ships peaceful because it fields no wave and stages no body peaceful discards. Every such fighter is a species peaceful keeps, and on peaceful every hit it lands on a player whose damage scales with difficulty — a mob’s melee and its projectiles — is zero. Advisory (warning, exit 0): declaring world.difficulty settles it.
DROP_COLLECT_UNORDERED
A collect dropped_by is not ordered after the fight that produces it: no kill objective for that wave precedes this collect in the objective graph. Without that edge “kill the boss, take its key” is an authoring intention the quest graph cannot prove, and the collect reads as reachable from the campaign’s first tick.
DROP_COLLECT_UNSOURCED
A collect dropped_by is not backed by the wave it names: the wave declares no {item} drop of this objective’s item, the count asks for more copies than the wave’s mobs can yield, or the objective also declares a container (the item cannot come out of a box and off a body).
DROP_NOT_TIERED
drops[] on an encounter that is not billed elite or boss. Only a named fight leaves anything behind; an ordinary mob’s kit is never farmable (no-grind constitution), so the declaration is refused rather than silently making rank-and-file gear lootable.
DROP_SLOT_UNFILLED
A drops[] slot entry does not name a distinct slot the same entity’s equipment actually fills — the slot is empty, or the same slot is declared twice. A mob can only leave behind a piece it wears, and it can only leave it behind once.
ENCHANTMENT_LEVEL
(spec-0021) An enchantment level is outside the 1..=255 range vanilla’s minecraft:enchantments component can carry.
ENCHANTMENT_UNKNOWN
(spec-0021) An equipment or loot enchantment id is not in the pinned 1.21.11 enchantment registry.
LANE_INVALID
(spec-0016 §6) A wave’s TD lane / summon declaration is structurally invalid or internally contradictory: an empty waypoints list, a waypoint anchor no area’s prefab provides, a repeated consecutive waypoint, an aggro_radius outside 4..=64, a mob whose attributes.follow_range disagrees with aggro_radius (they MUST be equal — a patrolling raider holds ground against a target it cannot engage), or lane together with summon: aggro-edge (a lane IS the routing; aggro-edge is its opposite).
LANE_NOT_RAIDER
(spec-0016 §6) A lane wave contains a non-raider species. Patrolling / patrol_target are Raider NBT: on anything else they are dropped and the mob simply stands where it spawned. The admitted set is vanilla’s own #minecraft:raiders tag, read from the vendored tag table — never a species list this engine keeps. Non-raiders use summon: aggro-edge instead.
LANE_SQUAD_TOO_SMALL
(spec-0016 §6) A lane wave fields fewer than 2 mobs. A lone patroller sets Patrolling:0b on itself when it finds no companion within its follow range (vanilla), so a one-mob lane cancels itself.
LANE_UNARMED
(spec-0016 §6) A lane pillager is not holding a crossbow. Its only attack goal is the crossbow goal, so a pillager that acquires a target it has no runnable attack for freezes in place indefinitely — patrol blocked by the target, nothing to run instead (live-verified deadlock).
REST_RESEAT_NO_BONFIRE
(spec-0016 §1) A wave declares respawns_on_rest: true but the campaign declares no bonfire — nothing can ever re-seat it, so the field is a silent no-op. Either add the bonfire the re-seat is meant to hang off, or drop the field.

Functions§

enchantment_component
The item component a stack’s enchantments are written to — vanilla’s own rule (EnchantmentHelper.getComponentType at 1.21.11): an enchanted book STORES its enchantments (minecraft:stored_enchantments, what an anvil applies to the item it is combined with), and every other item CARRIES them (minecraft:enchantments). Both are in the pinned 1.21.11 data_component_type registry.