[PR #7517] [MERGED] port_map: a moving piston click and the test instance status #7639

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

📋 Pull Request Information

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

Base: main ← Head: chore/led2-game2-018


📝 Commits (1)

  • 67cc72a port_map: a moving piston click and the test instance status

📊 Changes

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

View changed files

📝 tools/port_map/game2-018.tsv (+3 -3)

📄 Description

tools/port_map/game2-018.tsv: the file's last three missing rows now name the code that does the work, and none are left.

  • TestInstanceBlockEntity.Data.withStatus -> crates/horizon-client/src/game/game_tests.rs::Game::set_test_status — setRunning and setSuccess write the status there and mark the block entity updated, and a new status clears the error message, as withStatus does. The runner that drives it is commands/test_runs.rs (/test run, /test stop, /test clear), with game_tests.rs and game/test_instances.rs doing the runs; reset_test and create_empty_test reset a block to Status::Cleared with no error.
  • TestInstanceBlockEntity.Data.withError -> crates/horizon-client/src/game/game_tests.rs::Game::set_test_status — setErrorMessage stores the text as the block entity's error_message, which the next status change clears; set_test_status's own comment names setRunning, setSuccess and setErrorMessage.
  • MovingPistonBlock.useWithoutItem -> crates/horizon-world/src/level/interact.rs::Sim::use_without_item — the Class::MovingPiston arm: on a server, a click on a moving piston whose block entity is gone removes the block and consumes the action, and one still in flight passes.

The status enum, its NBT name and the error markers live in crates/horizon-client-render/src/test_instance_block.rs (Status::{Cleared,Running,Finished}, error_message, errors), and the block's beam reads the same status (game/beacon.rs::test_instance_beam).

Map-check:

PORT_LEDGER_OUT=/tmp/led-led python3 tools/port_ledger.py map-check tools/port_map/game2-018.tsv
150 rows, no problems.

Proven: the Horizon side read at the cites (set_test_status's two assignments and its mark_block_entity_updated, reset_test and create_empty_test's cleared status, and use_without_item's MovingPiston arm with its is_client_side and moving_piston tests); every where cell resolves under map-check; the file is at 150 rows with no where left empty for missing.

Not proven: no in-game check. Nothing here ran /test run against an instance block to watch the status change, and no right click on a moving piston was tried.


🔄 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/7517 **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/led2-game2-018` --- ### 📝 Commits (1) - [`67cc72a`](https://github.com/horizon-rust/horizon/commit/67cc72a2cc62220926b849c95ab126541904fbc1) port_map: a moving piston click and the test instance status ### 📊 Changes **1 file changed** (+3 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/game2-018.tsv` (+3 -3) </details> ### 📄 Description `tools/port_map/game2-018.tsv`: the file's last three `missing` rows now name the code that does the work, and none are left. - `TestInstanceBlockEntity.Data.withStatus` -> `crates/horizon-client/src/game/game_tests.rs::Game::set_test_status` — `setRunning` and `setSuccess` write the status there and mark the block entity updated, and a new status clears the error message, as `withStatus` does. The runner that drives it is `commands/test_runs.rs` (`/test run`, `/test stop`, `/test clear`), with `game_tests.rs` and `game/test_instances.rs` doing the runs; `reset_test` and `create_empty_test` reset a block to `Status::Cleared` with no error. - `TestInstanceBlockEntity.Data.withError` -> `crates/horizon-client/src/game/game_tests.rs::Game::set_test_status` — `setErrorMessage` stores the text as the block entity's `error_message`, which the next status change clears; `set_test_status`'s own comment names `setRunning`, `setSuccess` and `setErrorMessage`. - `MovingPistonBlock.useWithoutItem` -> `crates/horizon-world/src/level/interact.rs::Sim::use_without_item` — the `Class::MovingPiston` arm: on a server, a click on a moving piston whose block entity is gone removes the block and consumes the action, and one still in flight passes. The status enum, its NBT name and the error markers live in `crates/horizon-client-render/src/test_instance_block.rs` (`Status::{Cleared,Running,Finished}`, `error_message`, `errors`), and the block's beam reads the same status (`game/beacon.rs::test_instance_beam`). Map-check: ``` PORT_LEDGER_OUT=/tmp/led-led python3 tools/port_ledger.py map-check tools/port_map/game2-018.tsv 150 rows, no problems. ``` **Proven:** the Horizon side read at the cites (`set_test_status`'s two assignments and its `mark_block_entity_updated`, `reset_test` and `create_empty_test`'s cleared status, and `use_without_item`'s `MovingPiston` arm with its `is_client_side` and `moving_piston` tests); every `where` cell resolves under map-check; the file is at 150 rows with no `where` left empty for `missing`. **Not proven:** no in-game check. Nothing here ran `/test run` against an instance block to watch the status change, and no right click on a moving piston was tried. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 07:21:12 +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#7639
No description provided.