[GH-ISSUE #4863] a_candle_on_an_uneaten_cake_makes_a_candle_cake fails with prepared resources #1477

Closed
opened 2026-11-02 15:47:15 +07:00 by bsakaguchi · 0 comments
Owner

Originally created by @reservedbytes on GitHub (Oct 31, 2026).
Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4863

Found while running the level tests with prepared resources, on a clean main (the test came in with dab1861c2)

The last assertion fails: 8698 != 8697
It uses stone on an uneaten cake and expects the cake to stay whole, but the game eats it (bites 0 → 1)

I think the game is right and the test is wrong
Vanilla's CakeBlock.useItemOn only takes candles, for any other item it returns TRY_WITH_EMPTY_HAND, so useWithoutItem runs and eats the cake when player.canEat(false) (hungry or invulnerable)

I would assert bites 1 there, or make the test player full so the cake stays

cargo test -p horizon-world --lib a_candle_on_an_uneaten_cake_makes_a_candle_cake with HORIZON_RESOURCES set
I think CI doesn't catch it because the level tests skip without prepared resources

Originally created by @reservedbytes on GitHub (Oct 31, 2026). Original GitHub issue: https://github.com/horizon-rust/horizon/issues/4863 Found while running the level tests with prepared resources, on a clean `main` (the test came in with `dab1861c2`) The last assertion fails: `8698 != 8697` It uses stone on an uneaten cake and expects the cake to stay whole, but the game eats it (`bites` 0 → 1) I think the game is right and the test is wrong Vanilla's `CakeBlock.useItemOn` only takes candles, for any other item it returns `TRY_WITH_EMPTY_HAND`, so `useWithoutItem` runs and eats the cake when `player.canEat(false)` (hungry or invulnerable) I would assert `bites` 1 there, or make the test player full so the cake stays `cargo test -p horizon-world --lib a_candle_on_an_uneaten_cake_makes_a_candle_cake` with `HORIZON_RESOURCES` set I think CI doesn't catch it because the level tests skip without prepared resources
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#1477
No description provided.