[PR #4277] [MERGED] Place a candle on an uneaten cake #5536

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

📋 Pull Request Information

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

Base: main ← Head: fix/issue-4266-candle-on-cake


📝 Commits (1)

  • dab1861 Let a candle be placed on an uneaten cake (CakeBlock.useItemOn)

📊 Changes

4 files changed (+63 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+12 -0)
📝 crates/horizon-world/src/level/interact.rs (+26 -0)
📝 crates/horizon-world/src/level/tests.rs (+24 -0)
📝 tools/port_map/classes-03.tsv (+1 -1)

📄 Description

🤖 Opened by DUzzL's AI agent, not by DUzzL personally.

Fixes #4266

Cause: Horizon had no path for a candle used on an uneaten cake (vanilla CakeBlock.useItemOn), so the click did nothing.

Change: cake_candle_state in level/interact.rs turns a bite-0 cake into the matching unlit candle cake (plain and coloured). use_item_on plays block.cake.add_candle, sets the block and fires block_change, as in vanilla. In game.rs the client uses up one candle, and not in creative mode. A unit test covers plain, red, bitten and non-candle cases. The port_map row is updated. Candle snuffing (PR 3950) is not touched.

Tested: cargo fmt --check and cargo clippy -p horizon-world -p horizon-client --all-targets -- -D warnings pass, and cargo test -p horizon-world --lib level:: passes (66), including the new test.

Not tested: no in-game run, so the placement is not seen in play. Remote-client prediction for the candle placement is untested. Full test suites not run. tools/pr_ready.py not run.


🔄 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/4277 **Author:** [@DUzzL](https://github.com/DUzzL) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@rdbtCVS](https://github.com/rdbtCVS) **Base:** `main` ← **Head:** `fix/issue-4266-candle-on-cake` --- ### 📝 Commits (1) - [`dab1861`](https://github.com/horizon-rust/horizon/commit/dab1861c210aef7f1122917de55cc8a70ac8edd4) Let a candle be placed on an uneaten cake (CakeBlock.useItemOn) ### 📊 Changes **4 files changed** (+63 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+12 -0) 📝 `crates/horizon-world/src/level/interact.rs` (+26 -0) 📝 `crates/horizon-world/src/level/tests.rs` (+24 -0) 📝 `tools/port_map/classes-03.tsv` (+1 -1) </details> ### 📄 Description > 🤖 Opened by DUzzL's AI agent, not by DUzzL personally. Fixes #4266 **Cause:** Horizon had no path for a candle used on an uneaten cake (vanilla `CakeBlock.useItemOn`), so the click did nothing. **Change:** `cake_candle_state` in `level/interact.rs` turns a bite-0 cake into the matching unlit candle cake (plain and coloured). `use_item_on` plays `block.cake.add_candle`, sets the block and fires `block_change`, as in vanilla. In `game.rs` the client uses up one candle, and not in creative mode. A unit test covers plain, red, bitten and non-candle cases. The `port_map` row is updated. Candle snuffing (PR 3950) is not touched. **Tested:** `cargo fmt --check` and `cargo clippy -p horizon-world -p horizon-client --all-targets -- -D warnings` pass, and `cargo test -p horizon-world --lib level::` passes (66), including the new test. **Not tested:** no in-game run, so the placement is not seen in play. Remote-client prediction for the candle placement is untested. Full test suites not run. `tools/pr_ready.py` not run. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 05:13:16 +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#5536
No description provided.