[PR #828] [MERGED] Brewing stands tick in the level's block entity ticker list #2839

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/828
Author: @ludovic111
Created: 10/18/2026
Status: ✅ Merged
Merged: 10/18/2026
Merged by: @ludovic111

Base: main ← Head: perf/brewing-ticker


📝 Commits (1)

  • b540ccb Brewing stands tick in the level's block entity ticker list

📊 Changes

4 files changed (+21 additions, -20 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+0 -1)
📝 crates/horizon-client/src/game/block_entity_ticks.rs (+3 -1)
📝 crates/horizon-client/src/game/stations.rs (+16 -16)
📝 tools/test_block_entity_tickers_parity.py (+2 -2)

📄 Description

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

What

Brewing stands now tick in the level's block entity ticker list (Level.blockEntityTickers, #798), like every other server ticker. They used to have a pass of their own over the whole block-entity map every tick. #798 listed that pass as a known deviation.

  • Ticker list. BrewingStandBlock.getTicker gives every brewing stand a server ticker, so minecraft:brewing_stand states now get a slot.
  • Dispatch. tick_block_entities sends a BlockEntity::Brewing to the new tick_brewing_stand(pos). It is BrewingStandBlockEntity.serverTick for that one stand.
  • Unchanged. The brew sound, the drops, and writing the has_bottle_* state stay as they were. Each now happens as that stand ticks.

Behaviour changes, all matching vanilla

  • A brewing stand ticks in list order among the other block entities, not after all of them.
  • A brewing stand outside block-ticking range (simulation distance + 1) or outside the world border no longer ticks.

Measured

  • Main walked the whole block-entity map once more every tick for brewing stands, whatever the stands' number. That is one fewer full walk of the map per tick. The walk itself is small, though.
  • With 32,768 chests and one brewing stand around a single player (in-frame, offscreen, macOS sample for 20 s), tick_block_entities was 29 / 21 samples on main and 45 / 35 here. That is within noise on a shared machine.
  • In that scene the main thread's real cost is tick_block_entity_anims, the client-side lid tick:
    • 4235 to 8210 samples;
    • it rebuilds a SipHash map of every rendered block entity and sorts it, every tick.
  • That client-side walk is the next cost after this one. This PR doesn't touch it; #829 does.

Checks

  • tools/test_block_entity_tickers_parity.py now has brewing stands among its kinds.
  • cargo fmt --all --check and cargo clippy --workspace --all-targets -- -D warnings: clean. cargo test -p horizon-client --lib: 861 passed (on the integration below).
  • Parity, on an integration of this PR with #824, #827 and #829 on main 5b62d771: the 19 harnesses that cover these changes pass (light, lan, dedicated_server, save_roundtrip, world_reopen, disk, datafix ×6, world, server_world_gen, block_entity_tickers, block_entity_anim, block_entity_render, block_entity_storage, chunk_stage). --changed selects about 300 harnesses because nearly all of them link horizon-client; the first 29 of those passed too before I stopped the run on the busy Mac mini, and CI parity covers the rest.

Needs Ludovic

Nothing.

🤖 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/828 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/18/2026 **Status:** ✅ Merged **Merged:** 10/18/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/brewing-ticker` --- ### 📝 Commits (1) - [`b540ccb`](https://github.com/horizon-rust/horizon/commit/b540ccb642a20d6a22c75383dd49fd4817410e95) Brewing stands tick in the level's block entity ticker list ### 📊 Changes **4 files changed** (+21 additions, -20 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+0 -1) 📝 `crates/horizon-client/src/game/block_entity_ticks.rs` (+3 -1) 📝 `crates/horizon-client/src/game/stations.rs` (+16 -16) 📝 `tools/test_block_entity_tickers_parity.py` (+2 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What Brewing stands now tick in the level's block entity ticker list (`Level.blockEntityTickers`, #798), like every other server ticker. They used to have a pass of their own over the whole block-entity map every tick. #798 listed that pass as a known deviation. - **Ticker list.** `BrewingStandBlock.getTicker` gives every brewing stand a server ticker, so `minecraft:brewing_stand` states now get a slot. - **Dispatch.** `tick_block_entities` sends a `BlockEntity::Brewing` to the new `tick_brewing_stand(pos)`. It is `BrewingStandBlockEntity.serverTick` for that one stand. - **Unchanged.** The brew sound, the drops, and writing the `has_bottle_*` state stay as they were. Each now happens as that stand ticks. ## Behaviour changes, all matching vanilla - A brewing stand ticks in list order among the other block entities, not after all of them. - A brewing stand outside block-ticking range (simulation distance + 1) or outside the world border no longer ticks. ## Measured - Main walked the whole block-entity map once more every tick for brewing stands, whatever the stands' number. That is one fewer full walk of the map per tick. The walk itself is small, though. - With 32,768 chests and one brewing stand around a single player (in-frame, offscreen, macOS `sample` for 20 s), `tick_block_entities` was 29 / 21 samples on main and 45 / 35 here. That is within noise on a shared machine. - In that scene the main thread's real cost is `tick_block_entity_anims`, the client-side lid tick: - 4235 to 8210 samples; - it rebuilds a SipHash map of every rendered block entity and sorts it, every tick. - That client-side walk is the next cost after this one. This PR doesn't touch it; #829 does. ## Checks - `tools/test_block_entity_tickers_parity.py` now has brewing stands among its kinds. - `cargo fmt --all --check` and `cargo clippy --workspace --all-targets -- -D warnings`: clean. `cargo test -p horizon-client --lib`: 861 passed (on the integration below). - Parity, on an integration of this PR with #824, #827 and #829 on main 5b62d771: the 19 harnesses that cover these changes pass (`light`, `lan`, `dedicated_server`, `save_roundtrip`, `world_reopen`, `disk`, `datafix` ×6, `world`, `server_world_gen`, `block_entity_tickers`, `block_entity_anim`, `block_entity_render`, `block_entity_storage`, `chunk_stage`). `--changed` selects about 300 harnesses because nearly all of them link horizon-client; the first 29 of those passed too before I stopped the run on the busy Mac mini, and CI parity covers the rest. ## Needs Ludovic Nothing. 🤖 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-02 15:59:28 +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#2839
No description provided.