[PR #2237] [MERGED] Make a detector rail's comparator read the minecart on it #4132

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

📋 Pull Request Information

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

Base: main ← Head: fix/detector-rail-container-signal


📝 Commits (2)

  • 4c72a3a Make a detector rail's comparator read the minecart on it
  • 64279fa Merge main into fix/detector-rail-container-signal

📊 Changes

2 files changed (+71 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+43 -0)
📝 crates/horizon-client/src/game/minecarts.rs (+28 -1)

📄 Description

What and why

A comparator next to a powered detector rail always read 0. In vanilla it reads how full the chest or hopper minecart on the rail is, and a minecart with a command block reads its success count (always 0 here, since these carts hold no command). Each minecart now hands the world its kind and fullness, and the detector rail picks the right one from the same 0.2-inset search box vanilla uses. A cart whose menu is open counts the items in that menu, so the signal follows the player's moves.

Vanilla reference

  • DetectorRailBlock.getAnalogOutputSignal: only when POWERED; the command block minecart is checked first, then the first container minecart.
  • DetectorRailBlock.getSearchBB: the 0.2 inset box.
  • AbstractContainerMenu.getRedstoneSignalFromContainer for the fullness.

Self-check

cargo check -p horizon-client passes.


🔄 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/2237 **Author:** [@kacpherek](https://github.com/kacpherek) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/detector-rail-container-signal` --- ### 📝 Commits (2) - [`4c72a3a`](https://github.com/horizon-rust/horizon/commit/4c72a3a44f41278aa0481f95acf0d184bf540421) Make a detector rail's comparator read the minecart on it - [`64279fa`](https://github.com/horizon-rust/horizon/commit/64279fa1ce7d1134ab84af0948973cbe6ce8de34) Merge main into fix/detector-rail-container-signal ### 📊 Changes **2 files changed** (+71 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+43 -0) 📝 `crates/horizon-client/src/game/minecarts.rs` (+28 -1) </details> ### 📄 Description ## What and why A comparator next to a powered detector rail always read 0. In vanilla it reads how full the chest or hopper minecart on the rail is, and a minecart with a command block reads its success count (always 0 here, since these carts hold no command). Each minecart now hands the world its kind and fullness, and the detector rail picks the right one from the same 0.2-inset search box vanilla uses. A cart whose menu is open counts the items in that menu, so the signal follows the player's moves. ## Vanilla reference - `DetectorRailBlock.getAnalogOutputSignal`: only when `POWERED`; the command block minecart is checked first, then the first container minecart. - `DetectorRailBlock.getSearchBB`: the 0.2 inset box. - `AbstractContainerMenu.getRedstoneSignalFromContainer` for the fullness. ## Self-check `cargo check -p horizon-client` passes. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:14:55 +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#4132
No description provided.