[PR #5227] [MERGED] Let shears crop a growing plant's head #6150

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/5227
Author: @MSedgeMC
Created: 10/31/2026
Status: ✅ Merged
Merged: 10/31/2026
Merged by: @ludovic111

Base: main ← Head: fix/shears-crop-growing-plant


📝 Commits (1)

  • 92639ca Let shears crop a growing plant's head

📊 Changes

3 files changed (+104 additions, -8 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+6 -0)
📝 crates/horizon-client/src/game/growth.rs (+49 -2)
📝 tools/test_use_item_on_parity.py (+49 -6)

📄 Description

Fixes the ShearsItem.useOn row in the port ledger. (No issue.)

Vanilla's shears used on a growing plant's head that is not at its top age — kelp, weeping vines, twisting vines, cave vines — play block.growing_plant.crop, set the head to getMaxAgeState (age 25), fire GameEvent.BLOCK_CHANGE, wear the shears by one and succeed. Horizon had no such arm: the item-use chain went from bone meal and TNT straight to use_tool, so shears on a vine did nothing at all.

The arm sits beside the pumpkin carve and the beehive shear and reuses the same helpers (the block-change game event, the held-item wear, the used statistic, the item_used_on_block trigger). Age is read and written through the typed behaviour table, the way bone meal already grows these heads.

Proven: a_wall-style parity cases were added to tools/test_use_item_on_parity.py — the four heads at ages below the top, at the top, and with a stick or an empty hand, plus the four plant bodies (which have no AGE and must be left alone) — and the existing test is green on a build box for the neighbouring cases the arm must not disturb. Not proven: the new harness cases were not run: they need the 26.3 jar, the prepared data and a built game, none of which this host has. The Rust is compile-checked (cargo check -p horizon-client --lib --bins, exit 0).


🔄 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/5227 **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/shears-crop-growing-plant` --- ### 📝 Commits (1) - [`92639ca`](https://github.com/horizon-rust/horizon/commit/92639ca113a3976dd4bde7c2f685f25d2b285757) Let shears crop a growing plant's head ### 📊 Changes **3 files changed** (+104 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+6 -0) 📝 `crates/horizon-client/src/game/growth.rs` (+49 -2) 📝 `tools/test_use_item_on_parity.py` (+49 -6) </details> ### 📄 Description Fixes the `ShearsItem.useOn` row in the port ledger. (No issue.) Vanilla's shears used on a growing plant's head that is not at its top age — kelp, weeping vines, twisting vines, cave vines — play `block.growing_plant.crop`, set the head to `getMaxAgeState` (age 25), fire `GameEvent.BLOCK_CHANGE`, wear the shears by one and succeed. Horizon had no such arm: the item-use chain went from bone meal and TNT straight to `use_tool`, so shears on a vine did nothing at all. The arm sits beside the pumpkin carve and the beehive shear and reuses the same helpers (the block-change game event, the held-item wear, the `used` statistic, the `item_used_on_block` trigger). Age is read and written through the typed behaviour table, the way bone meal already grows these heads. **Proven:** `a_wall`-style parity cases were added to `tools/test_use_item_on_parity.py` — the four heads at ages below the top, at the top, and with a stick or an empty hand, plus the four plant *bodies* (which have no `AGE` and must be left alone) — and the existing test is green on a build box for the neighbouring cases the arm must not disturb. **Not proven:** the new harness cases were not run: they need the 26.3 jar, the prepared data and a built game, none of which this host has. The Rust is compile-checked (`cargo check -p horizon-client --lib --bins`, exit 0). --- <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#6150
No description provided.