Skip to content

Conversation

@TogAr2
Copy link

@TogAr2 TogAr2 commented Jun 2, 2025

I was messing around with observers and thought this could also be useful for the base project.

This PR implements observer functionality for both redpiler and the base redstone backend, closing #73. It also includes a bunch of observer related tests. I am fairly sure the observer implementation is accurate and exactly matches vanilla.

The changes to block updates may slightly negatively impact performance, especially when not using redpiler. However, it is just a simple loop to check for adjacent blocks when a block is updated, so I imagine it is fine.
When using redpiler, performance should be nearly identical, the only change being that node updates are now also done for repeater locking and output blocks (e.g. lamps turning on or trapdoors changing state).

Also, Redpiler will now only update nodes when their maximum input signal strength has changed, since no node actually uses any signal strength below the max. (This change was needed for observers to work correctly, but I implemented it for every node.)

@JackmakesOS
Copy link

How did you join it Cus i can't

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.

2 participants