[PR #7374] [MERGED] Port map: falling_block_visible is the shouldRender check #7561

Closed
opened 2026-11-03 07:19:48 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: chore/stale1-client-004


📝 Commits (1)

  • a345219 Port map: falling_block_visible is the shouldRender check

📊 Changes

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

View changed files

📝 tools/port_map/client-004.tsv (+1 -1)

📄 Description

Row 36 of tools/port_map/client-004.tsv had missing in the verdict cell for FallingBlockRenderer.shouldRender, with a note saying a falling block inside an identical block is still drawn and that game.rs has no such check. game.rs has it, at the top of the file.

row before now cites
36 FallingBlockRenderer.shouldRender missing — "a falling block inside an identical block is still drawn; no such check in game.rs or falling_block.rs" crates/horizon-client/src/game.rs::falling_block_visible — a falling block whose own state is the state of the cell its feet are in is not drawn, so a NoGravity block or one that has just landed draws nothing; the entity draw skips it and a unit test covers both cases

Validation, against a build of upstream/main (62d8b5828) with both 26.3 jars in /tmp/led-stale1:

$ PORT_LEDGER_OUT=/tmp/led-stale1 python3 tools/port_ledger.py map-check tools/port_map/client-004.tsv
149 rows, no problems.

Proven: vanilla FallingBlockRenderer.shouldRender (:21) is super.shouldRender(...) && entity.getBlockState() != entity.level().getBlockState(entity.blockPosition()). falling_block_visible(state, cell) is that comparison, and the falling block loop in game.rs:10912 takes the entity's state and self.world.block(x, y, z) for the cell its feet are in (Floor of its position, which is blockPosition() for a falling block) and skips the block when they are equal. The two assertions at game.rs:21434 cover the identical-state and different-state cases.

Not proven: that the whole shouldRender is ported — the super.shouldRender half (the outline/frustum part of EntityRenderer.shouldRender) is not part of this fn and was not traced to its caller here, so the row claims the state comparison vanilla adds, not the distance or frustum test above it.


🔄 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/7374 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/stale1-client-004` --- ### 📝 Commits (1) - [`a345219`](https://github.com/horizon-rust/horizon/commit/a345219dadc2721bbcb420f07fc63a6539ee0600) Port map: falling_block_visible is the shouldRender check ### 📊 Changes **1 file changed** (+1 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/client-004.tsv` (+1 -1) </details> ### 📄 Description Row 36 of `tools/port_map/client-004.tsv` had `missing` in the verdict cell for `FallingBlockRenderer.shouldRender`, with a note saying a falling block inside an identical block is still drawn and that `game.rs` has no such check. `game.rs` has it, at the top of the file. | row | before | now cites | | --- | --- | --- | | 36 `FallingBlockRenderer.shouldRender` | `missing` — "a falling block inside an identical block is still drawn; no such check in game.rs or falling_block.rs" | `crates/horizon-client/src/game.rs::falling_block_visible` — a falling block whose own state is the state of the cell its feet are in is not drawn, so a `NoGravity` block or one that has just landed draws nothing; the entity draw skips it and a unit test covers both cases | Validation, against a build of `upstream/main` (62d8b5828) with both 26.3 jars in `/tmp/led-stale1`: ``` $ PORT_LEDGER_OUT=/tmp/led-stale1 python3 tools/port_ledger.py map-check tools/port_map/client-004.tsv 149 rows, no problems. ``` **Proven:** vanilla `FallingBlockRenderer.shouldRender` (`:21`) is `super.shouldRender(...) && entity.getBlockState() != entity.level().getBlockState(entity.blockPosition())`. `falling_block_visible(state, cell)` is that comparison, and the falling block loop in `game.rs:10912` takes the entity's state and `self.world.block(x, y, z)` for the cell its feet are in (`Floor` of its position, which is `blockPosition()` for a falling block) and skips the block when they are equal. The two assertions at `game.rs:21434` cover the identical-state and different-state cases. **Not proven:** that the whole `shouldRender` is ported — the `super.shouldRender` half (the outline/frustum part of `EntityRenderer.shouldRender`) is not part of this fn and was not traced to its caller here, so the row claims the state comparison vanilla adds, not the distance or frustum test above it. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:19:48 +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#7561
No description provided.