Skip to content

Stop prioritizing diodes whose front diode faces back - #266

Open
Paul1365972 wants to merge 2 commits into
MCHPR:masterfrom
Paul1365972:fix/diode-head-to-head-priority
Open

Paul1365972 wants to merge 2 commits into
MCHPR:masterfrom
Paul1365972:fix/diode-head-to-head-priority

Conversation

@Paul1365972

@Paul1365972 Paul1365972 commented Sep 30, 2026 •

Copy link
Copy Markdown
Contributor

In vanilla, DiodeBlock.shouldPrioritize gives a repeater or comparator a higher tick priority only when the block in front is a diode that does not face back into it.
We currently give a higher priority to any diode in front, so two diodes facing each other head to head both tick earlier than in vanilla.
This has no effect downstream, since a diode's output into the front of another diode is ignored, but it makes sense to match vanilla anyway.

This adds mchprs_redstone::diode_should_be_prioritized, which the repeater and comparator tick scheduling and Redpiler's identify_nodes now use.
Redpiler's facing_diode field is renamed to prioritized to match.

While at it, the knowledge of which sides a block powers now lives only in mchprs_redstone.
provides_weak_power and provides_strong_power move there from Redpiler's input_search, and get_weak_power/get_strong_power are built on them plus a new get_output_power, so the two crates can no longer drift apart.
Redstone wire is left as is.

@Paul1365972
Paul1365972 force-pushed the fix/diode-head-to-head-priority branch 2 times, most recently from 7ff7b3d to 3356e12 Compare November 16, 2026 22:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant