[PR #6754] [MERGED] Draw dropped items only as far as vanilla does #7072

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

📋 Pull Request Information

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

Base: main ← Head: fix/item-entity-render-distance


📝 Commits (3)

  • 7ec5899 Draw dropped items only as far as vanilla does
  • 38ce163 Merge remote-tracking branch 'origin/main' into fix/item-entity-render-distance
  • 8f91c15 Format the item render range

📊 Changes

2 files changed (+22 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/entity_culling.rs (+11 -0)
📝 crates/horizon-client/src/game/item_draw.rs (+11 -1)

📄 Description

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

What

Horizon drew dropped items up to 64 blocks away. Vanilla's ItemEntity keeps the default Entity.shouldRenderAtSqrDistance: 64 × its 0.25 box × the entity view scale. That is 24 blocks at render distance 12, 32 at 16 and 40 from 20 on, measured from the item's current position. Horizon now uses the same range (entity_culling::default_range, which other entities already use). Item pickup particles are not entities and keep their 64 blocks.

Found while building the many-entity stress scenes: around a large storage room or farm, every item between 32 and 64 blocks was posed and uploaded each frame, though vanilla never shows it.

  • a_dropped_item_is_drawn_sixteen_blocks_times_the_view_scale: 24 / 32 / 40 blocks at render distance 12 / 16 / 32, computed by hand from the vanilla formula.

Checks

These ran on playhorizon instead of pr_ready.py (the slot-limited box):

head 8f91c1534e (38ce16338c + a rustfmt-only commit)
cargo fmt --all -- --check                                   ok (after the format commit)
cargo clippy --profile fast -p horizon-client -p horizon-client-lib -p horizon-client-render --lib --bins --tests -- -D warnings   ok, 0 diagnostics
cargo test --workspace --lib --bins --tests (CI verify)     pass, including entity_culling's new test

🤖 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/6754 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/item-entity-render-distance` --- ### 📝 Commits (3) - [`7ec5899`](https://github.com/horizon-rust/horizon/commit/7ec58998d6d65f5cd223afb7a1186dff9f8c4305) Draw dropped items only as far as vanilla does - [`38ce163`](https://github.com/horizon-rust/horizon/commit/38ce16338ca881e10bfc29d72849a52800312d5a) Merge remote-tracking branch 'origin/main' into fix/item-entity-render-distance - [`8f91c15`](https://github.com/horizon-rust/horizon/commit/8f91c1534e5d75701c4969f745435d4420c78f63) Format the item render range ### 📊 Changes **2 files changed** (+22 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/entity_culling.rs` (+11 -0) 📝 `crates/horizon-client/src/game/item_draw.rs` (+11 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What Horizon drew dropped items up to 64 blocks away. Vanilla's `ItemEntity` keeps the default `Entity.shouldRenderAtSqrDistance`: 64 × its 0.25 box × the entity view scale. That is 24 blocks at render distance 12, 32 at 16 and 40 from 20 on, measured from the item's current position. Horizon now uses the same range (`entity_culling::default_range`, which other entities already use). Item pickup particles are not entities and keep their 64 blocks. Found while building the many-entity stress scenes: around a large storage room or farm, every item between 32 and 64 blocks was posed and uploaded each frame, though vanilla never shows it. - `a_dropped_item_is_drawn_sixteen_blocks_times_the_view_scale`: 24 / 32 / 40 blocks at render distance 12 / 16 / 32, computed by hand from the vanilla formula. ## Checks These ran on playhorizon instead of `pr_ready.py` (the slot-limited box): ``` head 8f91c1534e (38ce16338c + a rustfmt-only commit) cargo fmt --all -- --check ok (after the format commit) cargo clippy --profile fast -p horizon-client -p horizon-client-lib -p horizon-client-render --lib --bins --tests -- -D warnings ok, 0 diagnostics cargo test --workspace --lib --bins --tests (CI verify) pass, including entity_culling's new test ``` 🤖 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:33:20 +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#7072
No description provided.