[PR #5937] [MERGED] A dropped item rests on a boat, a minecart, a shulker or a held-still happy ghast #6574

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/5937
Author: @xFedeT
Created: 11/1/2026
Status: ✅ Merged
Merged: 11/1/2026
Merged by: @ludovic111

Base: main ← Head: fix/happy-ghast


📝 Commits (2)

  • 8773007 A dropped item rests on a boat, a minecart, a shulker or a held-still happy ghast
  • 3d6b8c6 Dropped items look only at the vehicles near them

📊 Changes

5 files changed (+287 additions, -9 deletions)

View changed files

📝 crates/horizon-client/src/entities.rs (+228 -6)
📝 crates/horizon-client/src/entities/fluids.rs (+27 -3)
📝 crates/horizon-client/src/game.rs (+11 -0)
📝 crates/horizon-client/src/game/ghasts.rs (+19 -0)
📝 crates/horizon-client/src/game/remote.rs (+2 -0)

📄 Description

🤖 Opened by xFedeT's AI agent (Claude Code, Claude Sonnet 5.5), not by xFedeT personally.

Part of #5831 (its second point: items fall through a happy ghast's back).

What vanilla does

Entity.collide stops a moving entity at the entities for which canBeCollidedWith(entity) is true. HappyGhast.canBeCollidedWith is true for an adult that is alive and isOnStillTimeout() (or, on a client, for a player above its top); a player standing on its back keeps it still (scanPlayerAboveGhast sets the timeout to 10). Boats, minecarts and living shulkers collide too. So an item dropped on a ghast's back lies there.

What was wrong

ItemEntity::tick resolved its movement against blocks only, so an item dropped on a ghast's back, or on a boat, fell through. The player already stood on the ghast (player_entity_collisions).

What changes

  • ItemEntity::tick takes the boxes of the entities that collide with an item and resolves its movement against them as well (EntityCollisions).
  • game/ghasts.rs::item_entity_collisions: boats, minecarts, living shulkers and adult happy ghasts on a still timeout.
  • A client copy of an item still moves on blocks only; the server decides what it rests on.

Verification

  • pr_ready --quick: fmt, horizon-client tests (1688, with a new one: an item lands on an entity box under it, at its top, and on the stone with no box), Python tests pass. Clippy fails in crates/horizon-world/src/block_state_properties.rs:161 (needless_borrow), a file this pull request does not touch: the toolchain here is newer than main's.
  • Live, offscreen game: with a player standing on a happy ghast at y 102 (the ghast stayed still), a stick dropped above its back stayed at y 106.0, its top; before the change it fell to y 100 (the floor). A stick dropped on an oak boat at y 100 rests at y 100.5625.

Not done

The first point of the issue (the harness goggles stay up while the ghast is ridden) does not reproduce here: with /ride @s mount on a harnessed happy ghast the goggles are down over the eyes (screenshot). I did not try mounting by right-click, so that point stays open. #5831 is not closed by this.

Screenshots: item on the back goggles down

🤖 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/5937 **Author:** [@xFedeT](https://github.com/xFedeT) **Created:** 11/1/2026 **Status:** ✅ Merged **Merged:** 11/1/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/happy-ghast` --- ### 📝 Commits (2) - [`8773007`](https://github.com/horizon-rust/horizon/commit/8773007a60ed59c252f9abbb6678df05b579415b) A dropped item rests on a boat, a minecart, a shulker or a held-still happy ghast - [`3d6b8c6`](https://github.com/horizon-rust/horizon/commit/3d6b8c6d189eb8cd104cebb9662b7e113f6ea34d) Dropped items look only at the vehicles near them ### 📊 Changes **5 files changed** (+287 additions, -9 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/entities.rs` (+228 -6) 📝 `crates/horizon-client/src/entities/fluids.rs` (+27 -3) 📝 `crates/horizon-client/src/game.rs` (+11 -0) 📝 `crates/horizon-client/src/game/ghasts.rs` (+19 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+2 -0) </details> ### 📄 Description > 🤖 Opened by xFedeT's AI agent (Claude Code, Claude Sonnet 5.5), not by xFedeT personally. Part of #5831 (its second point: items fall through a happy ghast's back). ## What vanilla does `Entity.collide` stops a moving entity at the entities for which `canBeCollidedWith(entity)` is true. `HappyGhast.canBeCollidedWith` is true for an adult that is alive and `isOnStillTimeout()` (or, on a client, for a player above its top); a player standing on its back keeps it still (`scanPlayerAboveGhast` sets the timeout to 10). Boats, minecarts and living shulkers collide too. So an item dropped on a ghast's back lies there. ## What was wrong `ItemEntity::tick` resolved its movement against blocks only, so an item dropped on a ghast's back, or on a boat, fell through. The player already stood on the ghast (`player_entity_collisions`). ## What changes - `ItemEntity::tick` takes the boxes of the entities that collide with an item and resolves its movement against them as well (`EntityCollisions`). - `game/ghasts.rs::item_entity_collisions`: boats, minecarts, living shulkers and adult happy ghasts on a still timeout. - A client copy of an item still moves on blocks only; the server decides what it rests on. ## Verification - `pr_ready --quick`: fmt, `horizon-client` tests (1688, with a new one: an item lands on an entity box under it, at its top, and on the stone with no box), Python tests pass. Clippy fails in `crates/horizon-world/src/block_state_properties.rs:161` (`needless_borrow`), a file this pull request does not touch: the toolchain here is newer than main's. - Live, offscreen game: with a player standing on a happy ghast at y 102 (the ghast stayed still), a stick dropped above its back stayed at y 106.0, its top; before the change it fell to y 100 (the floor). A stick dropped on an oak boat at y 100 rests at y 100.5625. ## Not done The first point of the issue (the harness goggles stay up while the ghast is ridden) does not reproduce here: with `/ride @s mount` on a harnessed happy ghast the goggles are down over the eyes (screenshot). I did not try mounting by right-click, so that point stays open. #5831 is not closed by this. Screenshots: ![item on the back](https://github.com/xFedeT/horizon/blob/pr-screenshots/5831/item-on-ghast-back.png?raw=true) ![goggles down](https://github.com/xFedeT/horizon/blob/pr-screenshots/5831/goggles-down-ridden.png?raw=true) 🤖 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 06:23:14 +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#6574
No description provided.