## [0.4.0] - 2026-06-19
Built for **Minecraft 1.20.1 / Forge**, requiring **MCA Reborn 7.6.x** and **Architectury API**.
Save-data compatible with 0.1.0–0.3.0 worlds; the new **village projects** are additive and pre-0.4.0
worlds load cleanly. **Datapack breaking change:** `chain.time_limit_ticks` has been replaced by the
new `failure` block (see *Changed*/*Removed*). **Network protocol bumped to v2** — client and server
must run matching versions (the project packets are rejected at handshake otherwise).
### Added
- **Quest failure states & deadlines** — a new optional `failure` block makes a quest *expire* while
it's active, with author-controlled triggers and outcomes. Failure is server-authoritative,
persisted (the deadline is anchored to acceptance time, so it survives logout/restart), grants no
rewards, and records a `FAILED` outcome that follow-up quests branch on via the existing
`mcaquests:quest_failed` condition.
- **Triggers** (combine freely; first to fire wins): `deadline_ticks` (relative deadline),
`deadline_time` (fail at a Minecraft time-of-day, e.g. "before sunrise"), `require_weather`
(fail when the weather stops matching, e.g. "while it's raining"), and `fail_on_giver_death`
(per-quest, independent of the global `failQuestIfGiverDies` config).
- **Outcomes**: `failure_hearts` (relationship penalty, or `0` for non-punitive), `retry_after`
(cooldown before the quest can be offered again), and `block_retry` (permanent lock). The giver's
`dialogue.failed` line is shown on failure; recovery quests are expressed with `quest_failed`.
- A quest already complete ("ready to turn in") is **not** failed by a time/weather trigger — a
grace window to hand it in. All failure paths route through one idempotent handler, so no quest
ever double-fails or duplicates a completion.
- **HUD deadline countdown** — the quest tracker shows a live `m:ss` countdown for quests with a time
deadline, turning red in the final minute. Weather/giver-death failures show no countdown.
- **3 built-in failure examples** — `guard/dawn_defense` (kill zombies before sunrise),
`cleric/urgent_medicine` (+ `cleric/urgent_medicine_recovery`, a recovery quest gated on
`quest_failed`), and `fisherman/rain_catch` (fish while it's raining).
- **Failure validation** — `/mcaquests validate` reports a `failure` block with no trigger, a
`failure_hearts` magnitude past the hearts clamp, and `block_retry` combined with `retry_after`.
- **Village projects** — a new, separate system of **shared, multi-stage community goals** loaded from
`data/<namespace>/mcaquests/projects/**.json`. A project's progress is **shared** (stored in the
world save, not per-player), so multiple players contribute toward one common objective. Fully
additive and backward compatible — existing quests are unchanged and pre-0.4.0 worlds load cleanly.
- **5 scopes** decide who shares the progress: `player`, `villager`, `family`, `profession`, and
`village`. The MCA-backed scopes (`family`/`profession`/`village`) resolve via MCA's village/
relationship data and **fail safe** (the project never appears) when that data is missing.
- **Phases** run in order — a phase is entered only after every earlier phase completes — each with
its own dialogue, objectives, rewards, and an optional `unlock` gate.
- **4 project objective types** that track shared progress: `donate_item` (items consumed and banked
into the pool, with an optional `per_player_cap`), `project_kill_entity`, `project_place_block`,
and `project_talk_to_profession`.
- **Shared rewards** wrap any existing quest reward with a `target` (`contributors`,
`all_participants`, `sponsor_village`, `top_contributor`) and add new reward types
(`hearts_with_sponsor`, `hearts_with_participants`, `village_reputation`, `unlock`). Projects also
carry independent **mod-side village reputation** deltas (`on_phase_complete` /
`on_project_complete` / `on_fail`), and a new `mcaquests:village_reputation` condition tests a
giver's reputation in any quest **or** project condition tree.
- **Sponsors** (by profession) surface a project via a **View Project** button in the MCA villager
menu; with `oneSponsorPerProjectPerDay` only one deterministically chosen villager per village
offers a given project per day. Contributions are atomic and server-authoritative (items validated
and consumed server-side, then banked, then synced); per-phase rewards distribute exactly once,
with offline players' non-hearts rewards queued for next login and villager hearts queued via MCA.
- **6 built-in example projects**: `guardhouse_stockpile`, `library_restoration`,
`festival_preparation`, `well_repair`, `after_raid_recovery`, and `missing_villager_search`.
- **Project commands** — `/mcaquests project list`, `info <id>`, `validate`, `reset <id>`,
`advance <id>` (test-only force-advance), and `debug <id>` (explains availability from the nearest
villager); list/info/debug at op level 2, validate/reset/advance at op level 3.
- **Project validation** flags unknown scope/objective/reward type ids, missing phases, and
unknown/disabled or circular `follow_up` chains as errors, with warnings for empty non-final
phases, MCA-dependent scopes while MCA is absent, disabled command rewards, and mismatched reward
targets. Hard errors abort the load under `strictJsonValidation`.
- A **project menu, quest-log section, and HUD tracker** (`showProjectTrackerHud` /
`projectTrackerMaxEntries`) surface active projects and their shared progress.
- **Network protocol bumped to v2.** Project sync/contribution packets require a **matching client
and server**; mismatched versions are rejected at handshake.
### Changed
- The `chain.time_limit_ticks` deadline is now `failure.deadline_ticks` — it works on **any** quest,
not just chains, and gains the richer triggers/outcomes above. The two built-in chain quests that
used it (`farmer_family/3_apprentice`, `guard_safety/2_patrol`) were migrated.
### Removed
- `chain.time_limit_ticks` (replaced by the `failure` block). Datapacks still using it will fail
validation; move the value to `failure.deadline_ticks`.
Developer information
Projects on Modrinth are automatically available through a Maven repository for use with JVM build tools such as Gradle.
maven { name = "Modrinth"; url = "https://api.modrinth.com/maven" }