[PR #2004] [MERGED] Sculk: pass over idle sensors and catalysts in the block entity tick #3929

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

📋 Pull Request Information

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

Base: main ← Head: perf/sculk-ticking-chunks


📝 Commits (3)

  • 200b756 Sculk: pass over idle sensors and catalysts in the block entity tick
  • d5699d5 Merge remote-tracking branch 'origin/main' into perf/sculk-ticking-chunks
  • facc1d4 Merge remote-tracking branch 'origin/main' into perf/sculk-ticking-chunks

📊 Changes

2 files changed (+19 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/game/sculk.rs (+12 -5)
📝 crates/horizon-client/src/sculk.rs (+7 -0)

📄 Description

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

tick_sculk_blocks now passes over sculk sensors, calibrated sensors, shriekers and catalysts that have nothing to do this tick: no vibration chosen or travelling, none waiting in the selector, and no charge cursors to spread.

Vanilla's VibrationSystem.Ticker.tick and SculkSpreader.updateCursors return at once in that state (checked with tools/rea_vanilla.py), so the tick changed nothing. It still looked the block entity up, asked whether the 3×3 chunks around it tick (nine lookups), then looked it up a second time. Deep-dark worlds hold hundreds of these. The idle test (SculkEntity::idle) comes first now. A vibration scheduled during these ticks is chosen on the next tick at the earliest, as in vanilla. No random draw happens in an idle tick, so the order of draws is unchanged.

Measured

ThinkPad (i5-7200U, 4 threads), dedicated server, server_bench --servers horizon --bots N --behaviour walk --warmup 60 --seconds 120 --gamerule locator_bar=false, HORIZON_SPIKES=0 spans averaged over the last 2,400 ticks. Main at 781b7b87 against a build with this change and #1977, alternated, 1-minute load 0.5–2.

tick_sculk_blocks per tick main with this change
10 bots 0.58 / 0.68 ms 0.29 / 0.30 ms
25 bots 0.45 / 0.48 ms 0.11 ms

The sculk fixture harness (sculk) drives sensors, shriekers and catalysts through vibrations, charges and blooms on the in-frame path, and the server thread runs the same tick_sculk_blocks.

Self-check

pr_ready (tools/pr_ready.py on Ludovics-Mac-mini, against origin/main at b3149d43e, 99 min 28 s)

Check Result
Scope ✅ 11 files, +361 −48
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ 299 run, FAILED (errors=2) (1 min 52 s)
rustfmt ✅ (13 s)
clippy ✅ (1 min 18 s)
tests: horizon-client, horizon-threads, horizon-world ✅ 1500 passed (11 min 47 s)
doc tests ✅ 0 passed (9 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ✅ 91 affected, 91 passed (82 min 34 s)

One run for three branches: a merge of perf/sculk-ticking-chunks, perf/rings-out-of-reach (at 8b26c4cf3), perf/behaviour-cache-hash-once and #1991 (pr_ready's selection fix, without which pr_ready did not get past its plan). The 2 Python errors are main's on macOS (OracleReuseTests exit 127, a /private/var path in ParityRunnerTests); none of these branches touch Python.

🤖 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/2004 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `perf/sculk-ticking-chunks` --- ### 📝 Commits (3) - [`200b756`](https://github.com/horizon-rust/horizon/commit/200b756b4ae2cbd0cce186d1b4db8041805c9ac1) Sculk: pass over idle sensors and catalysts in the block entity tick - [`d5699d5`](https://github.com/horizon-rust/horizon/commit/d5699d5f905332c4c7ed791c3394bcf79da20d80) Merge remote-tracking branch 'origin/main' into perf/sculk-ticking-chunks - [`facc1d4`](https://github.com/horizon-rust/horizon/commit/facc1d4d08ba4cc40bb7b527535cef216bb88494) Merge remote-tracking branch 'origin/main' into perf/sculk-ticking-chunks ### 📊 Changes **2 files changed** (+19 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/sculk.rs` (+12 -5) 📝 `crates/horizon-client/src/sculk.rs` (+7 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. `tick_sculk_blocks` now passes over sculk sensors, calibrated sensors, shriekers and catalysts that have nothing to do this tick: no vibration chosen or travelling, none waiting in the selector, and no charge cursors to spread. Vanilla's `VibrationSystem.Ticker.tick` and `SculkSpreader.updateCursors` return at once in that state (checked with `tools/rea_vanilla.py`), so the tick changed nothing. It still looked the block entity up, asked whether the 3×3 chunks around it tick (nine lookups), then looked it up a second time. Deep-dark worlds hold hundreds of these. The idle test (`SculkEntity::idle`) comes first now. A vibration scheduled during these ticks is chosen on the next tick at the earliest, as in vanilla. No random draw happens in an idle tick, so the order of draws is unchanged. ## Measured ThinkPad (i5-7200U, 4 threads), dedicated server, `server_bench --servers horizon --bots N --behaviour walk --warmup 60 --seconds 120 --gamerule locator_bar=false`, `HORIZON_SPIKES=0` spans averaged over the last 2,400 ticks. Main at 781b7b87 against a build with this change and #1977, alternated, 1-minute load 0.5–2. | `tick_sculk_blocks` per tick | main | with this change | |---|---|---| | 10 bots | 0.58 / 0.68 ms | 0.29 / 0.30 ms | | 25 bots | 0.45 / 0.48 ms | 0.11 ms | The sculk fixture harness (`sculk`) drives sensors, shriekers and catalysts through vibrations, charges and blooms on the in-frame path, and the server thread runs the same `tick_sculk_blocks`. ## Self-check **pr_ready** (`tools/pr_ready.py` on Ludovics-Mac-mini, against origin/main at b3149d43e, 99 min 28 s) | Check | Result | | --- | --- | | Scope | ✅ 11 files, +361 −48 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ 299 run, FAILED (errors=2) (1 min 52 s) | | rustfmt | ✅ (13 s) | | clippy | ✅ (1 min 18 s) | | tests: horizon-client, horizon-threads, horizon-world | ✅ 1500 passed (11 min 47 s) | | doc tests | ✅ 0 passed (9 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ✅ 91 affected, 91 passed (82 min 34 s) | One run for three branches: a merge of `perf/sculk-ticking-chunks`, `perf/rings-out-of-reach` (at 8b26c4cf3), `perf/behaviour-cache-hash-once` and #1991 (pr_ready's selection fix, without which pr_ready did not get past its plan). The 2 Python errors are main's on macOS (`OracleReuseTests` exit 127, a `/private/var` path in `ParityRunnerTests`); none of these branches touch Python. 🤖 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 04:13: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#3929
No description provided.