[PR #2188] [MERGED] Loot: suspicious stew keeps the effect set_stew_effect rolled #4086

Closed
opened 2026-11-03 04:14:35 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2188
Author: @kacpherek
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/26/2026
Merged by: @ludovic111

Base: main ← Head: fix/loot-set-stew-effect


📝 Commits (1)

  • 8bfa7a5 Loot: suspicious stew keeps the effect set_stew_effect rolled

📊 Changes

5 files changed (+30 additions, -1 deletions)

View changed files

📝 crates/horizon-client/examples/probe/entity_death_loot_fixture.rs (+1 -0)
📝 crates/horizon-client/src/game/creatures.rs (+1 -0)
📝 crates/horizon-client/src/mobs/drops.rs (+1 -0)
📝 crates/horizon-client/src/structure_blocks.rs (+8 -0)
📝 crates/horizon-world/src/loot.rs (+19 -1)

📄 Description

What and why

Suspicious stew found in loot (shipwreck supply chests, ancient city ice boxes) had no effect on it. The set_stew_effect loot function picked an effect and drew its duration, but threw the result away.

The stack now carries the chosen effect, and it ends up in the item's suspicious_stew_effects component. The duration is in ticks: seconds times 20, unless the effect is instantaneous. The random draws are unchanged, so the same seed still rolls the same loot.

This covers every place that turns generated loot into items through loot_item_with_components (structure chests, vaults, trial spawners, decorated pots). Villager trades already stored the effect correctly.

Left out on purpose: minecraft:set_name. The only loot table that uses it names exploration maps with item_name, and Horizon does not show the item_name component anywhere yet, so adding it would change nothing the player can see.

Vanilla reference

  • SetStewEffectFunction.run
  • SuspiciousStewEffects.withEffectAdded

Self-check

cargo check -p horizon-client passes.


🔄 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/2188 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/loot-set-stew-effect` --- ### 📝 Commits (1) - [`8bfa7a5`](https://github.com/horizon-rust/horizon/commit/8bfa7a5b7ba893b6faa899d5d9a5b72f2ae7c060) Loot: suspicious stew keeps the effect set_stew_effect rolled ### 📊 Changes **5 files changed** (+30 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/examples/probe/entity_death_loot_fixture.rs` (+1 -0) 📝 `crates/horizon-client/src/game/creatures.rs` (+1 -0) 📝 `crates/horizon-client/src/mobs/drops.rs` (+1 -0) 📝 `crates/horizon-client/src/structure_blocks.rs` (+8 -0) 📝 `crates/horizon-world/src/loot.rs` (+19 -1) </details> ### 📄 Description ## What and why Suspicious stew found in loot (shipwreck supply chests, ancient city ice boxes) had no effect on it. The `set_stew_effect` loot function picked an effect and drew its duration, but threw the result away. The stack now carries the chosen effect, and it ends up in the item's `suspicious_stew_effects` component. The duration is in ticks: seconds times 20, unless the effect is instantaneous. The random draws are unchanged, so the same seed still rolls the same loot. This covers every place that turns generated loot into items through `loot_item_with_components` (structure chests, vaults, trial spawners, decorated pots). Villager trades already stored the effect correctly. Left out on purpose: `minecraft:set_name`. The only loot table that uses it names exploration maps with `item_name`, and Horizon does not show the `item_name` component anywhere yet, so adding it would change nothing the player can see. ## Vanilla reference - `SetStewEffectFunction.run` - `SuspiciousStewEffects.withEffectAdded` ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:14:35 +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#4086
No description provided.