[PR #4120] [MERGED] Golems: a pumpkin's base check takes any block at the head #5430

Closed
opened 2026-11-03 05:12:33 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: fix/golem-base-any-head


📝 Commits (1)

  • 2ba6caa Golems: a pumpkin's base check takes any block at the head

📊 Changes

1 file changed (+13 additions, -7 deletions)

View changed files

📝 crates/horizon-client/src/game/golems.rs (+13 -7)

📄 Description

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

Fixes a regression from #3959 that makes dispenser parity fail on main (minecraft:carved_pumpkin, 1 of 6000 cases: vanilla builds a snow golem, Horizon fails the dispense).

Vanilla asks canSpawnGolem (a dispenser's carved pumpkin, CarvedPumpkinBlock.canSpawnGolem) before the head is placed, with its base patterns (" ", "#", "#" and "~ ~", "###", "~#~"), whose head cell takes any block. #3959's find_pattern (golems in every orientation, thanks @DenisHumen) is right for trySpawnGolem, but it used the full pattern for the base check too, so the head cell had to hold a pumpkin that isn't there yet. The same happened in set_golem_head, which asks before it places the head.

find_golem takes a base flag: the head's cell accepts any block for can_spawn_golem and completes_golem; check_golem_spawn (after the head is placed) keeps the full pattern.

Test

  • python3 tools/parity.py dispenser on main: FAIL (the case above); pr_ready on this branch: running, its block follows in a comment.

🤖 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/4120 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/golem-base-any-head` --- ### 📝 Commits (1) - [`2ba6caa`](https://github.com/horizon-rust/horizon/commit/2ba6caa289e02bb64580bf164a01d6004aa2ee5b) Golems: a pumpkin's base check takes any block at the head ### 📊 Changes **1 file changed** (+13 additions, -7 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/golems.rs` (+13 -7) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Fixes a regression from #3959 that makes `dispenser` parity fail on main (`minecraft:carved_pumpkin`, 1 of 6000 cases: vanilla builds a snow golem, Horizon fails the dispense). Vanilla asks `canSpawnGolem` (a dispenser's carved pumpkin, `CarvedPumpkinBlock.canSpawnGolem`) **before** the head is placed, with its *base* patterns (`" ", "#", "#"` and `"~ ~", "###", "~#~"`), whose head cell takes any block. #3959's `find_pattern` (golems in every orientation, thanks @DenisHumen) is right for `trySpawnGolem`, but it used the full pattern for the base check too, so the head cell had to hold a pumpkin that isn't there yet. The same happened in `set_golem_head`, which asks before it places the head. `find_golem` takes a `base` flag: the head's cell accepts any block for `can_spawn_golem` and `completes_golem`; `check_golem_spawn` (after the head is placed) keeps the full pattern. ## Test - `python3 tools/parity.py dispenser` on main: FAIL (the case above); `pr_ready` on this branch: running, its block follows in a comment. 🤖 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-03 05:12:33 +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#5430
No description provided.