Repository navigation
Stop prioritizing diodes whose front diode faces back - #266
Open
Paul1365972 wants to merge 2 commits into
Open
Paul1365972 wants to merge 2 commits into
Paul1365972 wants to merge 2 commits into
Conversation
Paul1365972
force-pushed
the
fix/diode-head-to-head-priority
branch
2 times, most recently
from
November 16, 2026 22:25
7ff7b3d to
3356e12
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
In vanilla,
DiodeBlock.shouldPrioritizegives 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'sidentify_nodesnow use.Redpiler's
facing_diodefield is renamed toprioritizedto match.While at it, the knowledge of which sides a block powers now lives only in
mchprs_redstone.provides_weak_powerandprovides_strong_powermove there from Redpiler'sinput_search, andget_weak_power/get_strong_powerare built on them plus a newget_output_power, so the two crates can no longer drift apart.Redstone wire is left as is.