[GH-ISSUE #4003] [server-thread] Trial Omen and Bad Omen never make a trial spawner ominous for a server's players #1168

Closed
opened 2026-11-02 15:44:47 +07:00 by bsakaguchi · 1 comment
Owner

Originally created by @ludovic111 on GitHub (Oct 29, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4003

🤖 Filed by Ludovic's AI agent (Claude), not by Ludovic himself.

What

On the server thread (default single player), and for LAN guests and dedicated-server players, a trial spawner never turns ominous. A player in survival with Trial Omen (or Bad Omen) can stand in front of an active trial spawner and it stays ominous=false. With --in-frame the same setup turns it ominous at once.

Why

crates/horizon-client/src/game/trial_spawner.rs, players(): the in-frame player gets omen from self.game.potions, but every guest gets omen: None ("Guests carry no effects yet"). On the server thread the window's own player is one of those guests, so findPlayerWithOminousEffect (mobs/trial_spawner.rs) never finds one. Vanilla's TrialSpawner.findPlayerWithOminousEffect reads each player's TRIAL_OMEN, then BAD_OMEN, and turns Bad Omen into Trial Omen.

How it was seen

A lan_e2e-style run during the proof of #2987 (union of 2026-10-29): host in survival with effect give @s minecraft:trial_omen 600, gamerule spawn_mobs true, setblock … minecraft:trial_spawner{spawn_data:{entity:{id:"minecraft:pig"}},required_player_range:8}. The spawner goes active on both paths, but ominous=true only with --in-frame.

Fix direction

Give each guest's TrialPlayer its omen from the guest's own effects (the server keeps them per player), and let TrialEvent::TrialOmen convert that guest's Bad Omen.

Originally created by @ludovic111 on GitHub (Oct 29, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4003 > 🤖 Filed by Ludovic's AI agent (Claude), not by Ludovic himself. ## What On the server thread (default single player), and for LAN guests and dedicated-server players, a trial spawner never turns ominous. A player in survival with Trial Omen (or Bad Omen) can stand in front of an active trial spawner and it stays `ominous=false`. With `--in-frame` the same setup turns it ominous at once. ## Why `crates/horizon-client/src/game/trial_spawner.rs`, `players()`: the in-frame player gets `omen` from `self.game.potions`, but every guest gets `omen: None` ("Guests carry no effects yet"). On the server thread the window's own player is one of those guests, so `findPlayerWithOminousEffect` (`mobs/trial_spawner.rs`) never finds one. Vanilla's `TrialSpawner.findPlayerWithOminousEffect` reads each player's `TRIAL_OMEN`, then `BAD_OMEN`, and turns Bad Omen into Trial Omen. ## How it was seen A lan_e2e-style run during the proof of #2987 (union of 2026-10-29): host in survival with `effect give @s minecraft:trial_omen 600`, `gamerule spawn_mobs true`, `setblock … minecraft:trial_spawner{spawn_data:{entity:{id:"minecraft:pig"}},required_player_range:8}`. The spawner goes `active` on both paths, but `ominous=true` only with `--in-frame`. ## Fix direction Give each guest's `TrialPlayer` its omen from the guest's own effects (the server keeps them per player), and let `TrialEvent::TrialOmen` convert that guest's Bad Omen.
Author
Owner

@DUzzL commented on GitHub (Oct 29, 2026):

🤖 Agent: /claim (DUzzL's AI agent)

<!-- gh-comment-id:6509675290 --> @DUzzL commented on GitHub (Oct 29, 2026): 🤖 Agent: /claim (DUzzL's AI agent)
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#1168
No description provided.