[PR #439] [MERGED] Trial spawners: become ominous, Trial Omen and ominous item spawners #2566

Closed
opened 2026-11-02 15:57:15 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/439
Author: @ludovic111
Created: 10/15/2026
Status: ✅ Merged
Merged: 10/16/2026
Merged by: @ludovic111

Base: main ← Head: feat/ominous-trials


📝 Commits (6)

  • 2567a4a Add the vault's server logic with a parity harness
  • 2c07b5e Wire vaults into the game
  • 3ac3efe Save round-trip: a vault's next state update moves with the clock
  • ed54271 Show trial spawner and vault visuals
  • c4f915c Give trial chamber pots their loot, sherds and insertion
  • 6345308 Trial spawners: become ominous, Trial Omen and ominous item spawners

📊 Changes

25 files changed (+2988 additions, -83 deletions)

View changed files

📝 crates/horizon-client/examples/natural_spawn_fixture.rs (+331 -10)
📝 crates/horizon-client/src/containers.rs (+9 -0)
📝 crates/horizon-client/src/entity_nbt.rs (+6 -1)
📝 crates/horizon-client/src/game.rs (+32 -0)
📝 crates/horizon-client/src/game/block_entity_anims.rs (+27 -9)
➕ crates/horizon-client/src/game/decorated_pot.rs (+152 -0)
📝 crates/horizon-client/src/game/dispenser.rs (+16 -2)
➕ crates/horizon-client/src/game/ominous_item_spawner.rs (+174 -0)
📝 crates/horizon-client/src/game/spawner.rs (+29 -12)
📝 crates/horizon-client/src/game/spill.rs (+33 -0)
📝 crates/horizon-client/src/game/trial_spawner.rs (+108 -16)
➕ crates/horizon-client/src/game/trial_visuals.rs (+333 -0)
➕ crates/horizon-client/src/game/vault.rs (+242 -0)
📝 crates/horizon-client/src/lib.rs (+1 -0)
📝 crates/horizon-client/src/mobs/spawner.rs (+15 -10)
📝 crates/horizon-client/src/mobs/trial_spawner.rs (+254 -9)
📝 crates/horizon-client/src/save.rs (+2 -0)
📝 crates/horizon-client/src/structure_blocks.rs (+3 -0)
📝 crates/horizon-client/src/vanillagen.rs (+32 -0)
➕ crates/horizon-client/src/vault.rs (+771 -0)

...and 5 more files

📄 Description

Fixes #223. Top of the stack #410 → #417 → #422 → #433 → this one (based on feat/trial-pots).

What

  • Becoming ominous (tryDetectPlayers' ominous branch): a player seen with Trial Omen, or else Bad Omen, turns the spawner ominous. Bad Omen becomes Trial Omen (18000 ticks per level), level events 3020 fire at the player's eyes and at the spawner, and the spawner's mobs vanish (3012). The ominous config then starts over. The cooldown gating matches vanilla's.
  • Ominous item spawners (spawnOminousOminousItemSpawner):
    • Every 160 ticks while active, an ominous item spawner appears 2 to 5 blocks over a player or one of the spawner's mobs (a VISUAL clip). Its items come from getDispensingItems, seeded per 30×20×30 cell and kept once rolled.
    • New game/ominous_item_spawner.rs: the spawner floats, growing and turning, with ominous spawning particles and the about-to-spawn sound. After 60 to 120 ticks the item falls, or is fired down if it's a projectile (arrows, potions, fire and wind charges), with event 3021.
    • The dispenser's projectile shot is split out (shoot_projectile_item) to share it.
  • Baby zombies: zombies, piglins and zoglins read IsBaby from their tag, and zombies save it. Before this, the chambers' small_melee/baby_zombie spawners spawned adults, and a saved baby zombie loaded as an adult. The harness found this: item spawners over baby zombies sat one block too high.

Harness

tools/test_trial_spawner_parity.py now gives 30% of players Bad Omen or Trial Omen (various levels) and starts 15% of cases ominous. The oracle logs effect changes, the discarded mobs' 3012, and each item spawner's item, exact position and delay. 2,500 cases match vanilla: 209 spawners became ominous, 120 Trial Omens, 234 item spawners. The run also covered 2,352 mob spawns and 281 reward ejections.

Verified in game (Mac mini, offscreen, release build)

Seed 12345, trial chamber at (137, −24, −541), survival with effect give @s bad_omen:

  • The spawner went ominous=true, active and Bad Omen became Trial Omen (0, ~18000 ticks).
  • Ominous silverfish came out.
  • Item spawners dropped over the player:
    • An arrow floated in the blue particles, then was fired down.
    • A fire charge set the floor alight.
    • A lingering potion gave Strength.

Self-check

  • cargo fmt, cargo clippy --workspace --all-targets -- -D warnings clean
  • cargo test -p horizon-client: all pass
  • tools/parity.py --changed origin/main on this branch (the whole stack on main): every dependent harness passes.

Not done

  • Item spawners aren't saved: one left in an unloaded chunk is lost.
  • resetAfterBecomingOminous discards mobs without their equipment drops (their drop chances are 0 in practice).
  • LAN guests aren't seen by trial spawners or vaults.

Needs Ludovic

Nothing.

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/439 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/15/2026 **Status:** ✅ Merged **Merged:** 10/16/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/ominous-trials` --- ### 📝 Commits (6) - [`2567a4a`](https://github.com/horizon-rust/horizon/commit/2567a4a41aaeb13318756d2deba5331d81f61d63) Add the vault's server logic with a parity harness - [`2c07b5e`](https://github.com/horizon-rust/horizon/commit/2c07b5e621805ec33cdc198615be7a25c0a7742f) Wire vaults into the game - [`3ac3efe`](https://github.com/horizon-rust/horizon/commit/3ac3efe749c8d7cba9a1b768d070290a81d33606) Save round-trip: a vault's next state update moves with the clock - [`ed54271`](https://github.com/horizon-rust/horizon/commit/ed5427197f78d0118a81a712d79069d210c3cffd) Show trial spawner and vault visuals - [`c4f915c`](https://github.com/horizon-rust/horizon/commit/c4f915c9d121c75985549145db9f6fd8ce07afe5) Give trial chamber pots their loot, sherds and insertion - [`6345308`](https://github.com/horizon-rust/horizon/commit/63453086b67e2a1dcdafa5eba20207905b35d6f9) Trial spawners: become ominous, Trial Omen and ominous item spawners ### 📊 Changes **25 files changed** (+2988 additions, -83 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/natural_spawn_fixture.rs` (+331 -10) 📝 `crates/horizon-client/src/containers.rs` (+9 -0) 📝 `crates/horizon-client/src/entity_nbt.rs` (+6 -1) 📝 `crates/horizon-client/src/game.rs` (+32 -0) 📝 `crates/horizon-client/src/game/block_entity_anims.rs` (+27 -9) ➕ `crates/horizon-client/src/game/decorated_pot.rs` (+152 -0) 📝 `crates/horizon-client/src/game/dispenser.rs` (+16 -2) ➕ `crates/horizon-client/src/game/ominous_item_spawner.rs` (+174 -0) 📝 `crates/horizon-client/src/game/spawner.rs` (+29 -12) 📝 `crates/horizon-client/src/game/spill.rs` (+33 -0) 📝 `crates/horizon-client/src/game/trial_spawner.rs` (+108 -16) ➕ `crates/horizon-client/src/game/trial_visuals.rs` (+333 -0) ➕ `crates/horizon-client/src/game/vault.rs` (+242 -0) 📝 `crates/horizon-client/src/lib.rs` (+1 -0) 📝 `crates/horizon-client/src/mobs/spawner.rs` (+15 -10) 📝 `crates/horizon-client/src/mobs/trial_spawner.rs` (+254 -9) 📝 `crates/horizon-client/src/save.rs` (+2 -0) 📝 `crates/horizon-client/src/structure_blocks.rs` (+3 -0) 📝 `crates/horizon-client/src/vanillagen.rs` (+32 -0) ➕ `crates/horizon-client/src/vault.rs` (+771 -0) _...and 5 more files_ </details> ### 📄 Description Fixes #223. Top of the stack #410 → #417 → #422 → #433 → this one (based on `feat/trial-pots`). ## What - **Becoming ominous** (`tryDetectPlayers`' ominous branch): a player seen with Trial Omen, or else Bad Omen, turns the spawner ominous. Bad Omen becomes Trial Omen (18000 ticks per level), level events 3020 fire at the player's eyes and at the spawner, and the spawner's mobs vanish (3012). The ominous config then starts over. The cooldown gating matches vanilla's. - **Ominous item spawners** (`spawnOminousOminousItemSpawner`): - Every 160 ticks while active, an ominous item spawner appears 2 to 5 blocks over a player or one of the spawner's mobs (a VISUAL clip). Its items come from `getDispensingItems`, seeded per 30×20×30 cell and kept once rolled. - New `game/ominous_item_spawner.rs`: the spawner floats, growing and turning, with ominous spawning particles and the about-to-spawn sound. After 60 to 120 ticks the item falls, or is fired down if it's a projectile (arrows, potions, fire and wind charges), with event 3021. - The dispenser's projectile shot is split out (`shoot_projectile_item`) to share it. - **Baby zombies:** zombies, piglins and zoglins read `IsBaby` from their tag, and zombies save it. Before this, the chambers' `small_melee/baby_zombie` spawners spawned adults, and a saved baby zombie loaded as an adult. The harness found this: item spawners over baby zombies sat one block too high. ## Harness `tools/test_trial_spawner_parity.py` now gives 30% of players Bad Omen or Trial Omen (various levels) and starts 15% of cases ominous. The oracle logs effect changes, the discarded mobs' 3012, and each item spawner's item, exact position and delay. **2,500 cases match vanilla**: 209 spawners became ominous, 120 Trial Omens, 234 item spawners. The run also covered 2,352 mob spawns and 281 reward ejections. ## Verified in game (Mac mini, offscreen, release build) Seed 12345, trial chamber at (137, −24, −541), survival with `effect give @s bad_omen`: - The spawner went `ominous=true, active` and Bad Omen became Trial Omen (0, ~18000 ticks). - Ominous silverfish came out. - Item spawners dropped over the player: - An arrow floated in the blue particles, then was fired down. - A fire charge set the floor alight. - A lingering potion gave Strength. ## Self-check - `cargo fmt`, `cargo clippy --workspace --all-targets -- -D warnings` clean - `cargo test -p horizon-client`: all pass - `tools/parity.py --changed origin/main` on this branch (the whole stack on main): every dependent harness passes. ## Not done - Item spawners aren't saved: one left in an unloaded chunk is lost. - `resetAfterBecomingOminous` discards mobs without their equipment drops (their drop chances are 0 in practice). - LAN guests aren't seen by trial spawners or vaults. ## Needs Ludovic Nothing. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:57:15 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#2566
No description provided.