[PR #5228] [MERGED] Pick the seed a stem grew from #6151

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5228
Author: @MSedgeMC
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: fix/stem-pick-block


📝 Commits (2)

  • 1f354fc Pick the seed a stem grew from
  • 79a182d Let the stem name auto-deref, as clippy asks

📊 Changes

1 file changed (+36 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/block_items.rs (+36 -1)

📄 Description

Fixes the StemBlock.getCloneItemStack and AttachedStemBlock.getCloneItemStack rows in the port ledger. (No issue.)

A stem has no block item, so vanilla's pick-block on a pumpkin or melon stem — attached or not — returns the seed it grew from. Horizon's Game::picked_stack falls back to the block's own item and gives up when that is air, which a stem's always is, so middle-clicking a grown stem picked nothing.

One arm in the shared function, keyed on the four stem names (the class chain can say "a stem" but not which seed), so the local player, a LAN guest and a dedicated server all get it.

Proven: the new unit test passes on a build box (four stem names map to their seeds with the block item given as air, and an ordinary block keeps its own item). Not proven: nothing in a game — the check is a creative middle-click on a grown stem selecting a stack of seeds.


🔄 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/5228 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/stem-pick-block` --- ### 📝 Commits (2) - [`1f354fc`](https://github.com/horizon-rust/horizon/commit/1f354fcf65e36c2bda8ba05100331309f1689a49) Pick the seed a stem grew from - [`79a182d`](https://github.com/horizon-rust/horizon/commit/79a182d6af15895b43aaf1f64d8ca6b82fb62c8f) Let the stem name auto-deref, as clippy asks ### 📊 Changes **1 file changed** (+36 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/block_items.rs` (+36 -1) </details> ### 📄 Description Fixes the `StemBlock.getCloneItemStack` and `AttachedStemBlock.getCloneItemStack` rows in the port ledger. (No issue.) A stem has no block item, so vanilla's pick-block on a pumpkin or melon stem — attached or not — returns the **seed** it grew from. Horizon's `Game::picked_stack` falls back to the block's own item and gives up when that is air, which a stem's always is, so middle-clicking a grown stem picked nothing. One arm in the shared function, keyed on the four stem names (the class chain can say "a stem" but not which seed), so the local player, a LAN guest and a dedicated server all get it. **Proven:** the new unit test passes on a build box (four stem names map to their seeds with the block item given as air, and an ordinary block keeps its own item). **Not proven:** nothing in a game — the check is a creative middle-click on a grown stem selecting a stack of seeds. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:14:57 +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#6151
No description provided.