[PR #4816] [MERGED] Test blocks: trigger, reset, redstone signal and the start block's power #5868

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

📋 Pull Request Information

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

Base: main ← Head: parity/T1-runner


📝 Commits (1)

  • 56dcdc8 Test blocks: trigger, reset, the redstone signal and the start block's power

📊 Changes

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

View changed files

📝 crates/horizon-client-render/src/test_block.rs (+91 -0)
📝 crates/horizon-client/src/game.rs (+16 -0)
📝 crates/horizon-client/src/game/test_block_edit.rs (+1 -0)
📝 crates/horizon-client/src/game/test_blocks.rs (+68 -1)
📝 crates/horizon-world/src/level/hooks.rs (+6 -0)
📝 crates/horizon-world/src/level/redstone.rs (+5 -0)
📝 crates/horizon-world/src/level/tick.rs (+8 -0)

📄 Description

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

Part of #3520 (stage 1 of 3 for the game-test runner: test blocks' own behaviour; the runner and /test follow).

Rows

  • ServerGamePacketListenerImpl.handleTestInstanceBlockAction (RUN), partly: the test blocks that BlockBasedTestInstance drives now behave like vanilla's, so the runner (next PR) has something to start.

What changed

  • TestBlockEntity.trigger/reset/log and TestBlock.neighborChanged/ownSignal ported as TestBlock::trigger/reset/neighbor_changed/own_signal (pure, unit tested): a START block powers up and updates its neighbours; LOG logs; the others remember they were triggered; a non-START block triggers on a rising neighbour signal.
  • The level calls out for TestBlock.neighborChanged and TestBlock.tick (reset), like it does for structure blocks.
  • TestBlock.ownSignal: a powered START block gives a signal of 15 through getSignal, even though the block is not an isSignalSource (vanilla's SignalGetter.getSignal does not check it).

Vanilla followed

TestBlock.neighborChanged, TestBlock.tick, TestBlock.ownSignal, TestBlockEntity.trigger/reset/log, BlockBehaviour.getSignal, SignalGetter.getSignal.

Tests

test_block::tests (state transitions). fmt and clippy -D warnings clean on horizon-client, horizon-client-render and horizon-world.

🤖 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/4816 **Author:** [@levzzz5154](https://github.com/levzzz5154) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@levzzz5154](https://github.com/levzzz5154) **Base:** `main` ← **Head:** `parity/T1-runner` --- ### 📝 Commits (1) - [`56dcdc8`](https://github.com/horizon-rust/horizon/commit/56dcdc8464855291e2f9a0e6cf97c08e11c49f27) Test blocks: trigger, reset, the redstone signal and the start block's power ### 📊 Changes **7 files changed** (+195 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client-render/src/test_block.rs` (+91 -0) 📝 `crates/horizon-client/src/game.rs` (+16 -0) 📝 `crates/horizon-client/src/game/test_block_edit.rs` (+1 -0) 📝 `crates/horizon-client/src/game/test_blocks.rs` (+68 -1) 📝 `crates/horizon-world/src/level/hooks.rs` (+6 -0) 📝 `crates/horizon-world/src/level/redstone.rs` (+5 -0) 📝 `crates/horizon-world/src/level/tick.rs` (+8 -0) </details> ### 📄 Description > 🤖 Opened by levzzz5154's AI agent (Claude Code, Claude Sonnet 5.5), not by levzzz5154 personally. Part of #3520 (stage 1 of 3 for the game-test runner: test blocks' own behaviour; the runner and `/test` follow). ## Rows - `ServerGamePacketListenerImpl.handleTestInstanceBlockAction` (RUN), partly: the test blocks that `BlockBasedTestInstance` drives now behave like vanilla's, so the runner (next PR) has something to start. ## What changed - `TestBlockEntity.trigger/reset/log` and `TestBlock.neighborChanged/ownSignal` ported as `TestBlock::trigger/reset/neighbor_changed/own_signal` (pure, unit tested): a START block powers up and updates its neighbours; LOG logs; the others remember they were triggered; a non-START block triggers on a rising neighbour signal. - The level calls out for `TestBlock.neighborChanged` and `TestBlock.tick` (reset), like it does for structure blocks. - `TestBlock.ownSignal`: a powered START block gives a signal of 15 through `getSignal`, even though the block is not an `isSignalSource` (vanilla's `SignalGetter.getSignal` does not check it). ## Vanilla followed `TestBlock.neighborChanged`, `TestBlock.tick`, `TestBlock.ownSignal`, `TestBlockEntity.trigger/reset/log`, `BlockBehaviour.getSignal`, `SignalGetter.getSignal`. ## Tests `test_block::tests` (state transitions). fmt and clippy `-D warnings` clean on horizon-client, horizon-client-render and horizon-world. 🤖 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:33 +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#5868
No description provided.