[PR #4733] [MERGED] Show a landed falling block until its mesh is ready (AddTransientBlock) #5814

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

📋 Pull Request Information

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

Base: main ← Head: parity/D-transient


📝 Commits (1)

  • d49bcab Show the block a falling block lands as (ClientboundAddTransientBlockPacket)

📊 Changes

7 files changed (+187 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+10 -0)
📝 crates/horizon-client/src/game/falling_damage.rs (+16 -0)
📝 crates/horizon-client/src/game/moving_pistons.rs (+1 -1)
📝 crates/horizon-client/src/game/remote.rs (+1 -0)
➕ crates/horizon-client/src/game/transient_blocks.rs (+138 -0)
📝 crates/horizon-client/src/lan/containers.rs (+13 -0)
📝 crates/horizon-protocol/src/packets/play.rs (+8 -0)

📄 Description

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

Part of #3519
Part of #3520

What and why

A falling block that lands is replaced by its block update, but the section mesh takes a few frames to show it. Vanilla bridges that with ClientboundAddTransientBlockPacket; Horizon had only the packet id, so nothing was sent or handled. Now the server sends it for a landed falling block and the client shows the block until its section mesh has caught up.

Rows:

  • ClientboundAddTransientBlockPacket.write (#3520): play::AddTransientBlock (block pos + block state id, clientbound id 37), sent from finish_falling_block to the players tracking the falling block entity, after the landing (ChunkMap.sendToTrackingPlayers, new Hub::send_to_tracking). The state is the one falling_block_landed placed.
  • LevelExtractor.drainTransientBlockQueue (#3519): the packet handler queues (handleAddTransientBlockPacket, time to live 1.0 s); the queue is drained at the start of each entity-geometry frame into the shown set, keyed by block position (a second block at the same position replaces the first), each live for its time to live from the drain.
  • LevelRenderer.submitTransientBlocks (#3519): each block still live is drawn as a moving block at its position (the existing piston moving_block_vertices: block-position seed, tints, flat light). It is dropped when its time runs out, or once its section mesh was seen out of date and is rebuilt (the stand-in for performTransientBlockRemovals comparing the compile task's start with the block's creation time).

Kind

  • parity: Horizon now does what vanilla 26.3 does

Vanilla reference

ClientboundAddTransientBlockPacket, FallingBlockEntity.tick, ClientPacketListener.handleAddTransientBlockPacket, LevelExtractor.queueTransientBlock / drainTransientBlockQueue, LevelRenderer.addTransientBlock / submitTransientBlocks / performTransientBlockRemovals, SectionOcclusionGraph.schedulePropagationFrom.

Self-check

cargo +stable fmt --all, clippy -p horizon-protocol -p horizon-client --all-targets -D warnings, tests: protocol round trip of every clientbound packet (the new one added), the queue and drain. Parity harnesses left to CI.

🤖 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/4733 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/30/2026 **Status:** ✅ Merged **Merged:** 10/30/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `parity/D-transient` --- ### 📝 Commits (1) - [`d49bcab`](https://github.com/horizon-rust/horizon/commit/d49bcab591b0d3d521a0bca717054de59146a68d) Show the block a falling block lands as (ClientboundAddTransientBlockPacket) ### 📊 Changes **7 files changed** (+187 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+10 -0) 📝 `crates/horizon-client/src/game/falling_damage.rs` (+16 -0) 📝 `crates/horizon-client/src/game/moving_pistons.rs` (+1 -1) 📝 `crates/horizon-client/src/game/remote.rs` (+1 -0) ➕ `crates/horizon-client/src/game/transient_blocks.rs` (+138 -0) 📝 `crates/horizon-client/src/lan/containers.rs` (+13 -0) 📝 `crates/horizon-protocol/src/packets/play.rs` (+8 -0) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Part of #3519 Part of #3520 ## What and why A falling block that lands is replaced by its block update, but the section mesh takes a few frames to show it. Vanilla bridges that with `ClientboundAddTransientBlockPacket`; Horizon had only the packet id, so nothing was sent or handled. Now the server sends it for a landed falling block and the client shows the block until its section mesh has caught up. Rows: - `ClientboundAddTransientBlockPacket.write` (#3520): `play::AddTransientBlock` (block pos + block state id, clientbound id 37), sent from `finish_falling_block` to the players tracking the falling block entity, after the landing (`ChunkMap.sendToTrackingPlayers`, new `Hub::send_to_tracking`). The state is the one `falling_block_landed` placed. - `LevelExtractor.drainTransientBlockQueue` (#3519): the packet handler queues (`handleAddTransientBlockPacket`, time to live 1.0 s); the queue is drained at the start of each entity-geometry frame into the shown set, keyed by block position (a second block at the same position replaces the first), each live for its time to live from the drain. - `LevelRenderer.submitTransientBlocks` (#3519): each block still live is drawn as a moving block at its position (the existing piston `moving_block_vertices`: block-position seed, tints, flat light). It is dropped when its time runs out, or once its section mesh was seen out of date and is rebuilt (the stand-in for `performTransientBlockRemovals` comparing the compile task's start with the block's creation time). ## Kind - [x] parity: Horizon now does what vanilla 26.3 does ## Vanilla reference `ClientboundAddTransientBlockPacket`, `FallingBlockEntity.tick`, `ClientPacketListener.handleAddTransientBlockPacket`, `LevelExtractor.queueTransientBlock` / `drainTransientBlockQueue`, `LevelRenderer.addTransientBlock` / `submitTransientBlocks` / `performTransientBlockRemovals`, `SectionOcclusionGraph.schedulePropagationFrom`. ## Self-check `cargo +stable fmt --all`, `clippy -p horizon-protocol -p horizon-client --all-targets -D warnings`, tests: protocol round trip of every clientbound packet (the new one added), the queue and drain. Parity harnesses left to CI. 🤖 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 05:15:10 +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#5814
No description provided.