Recompute cached resource amounts when StackWatcher updates#62
Merged
Conversation
Fixes stale cached values when the requester switches networks.
Member
|
Thank you for your contribution. 1.20.1 is no longer supported except for critical bug fixes. I consider this a critical bug fix, so an official release will be published. I will cherry-pick the commit over to the other branches myself. |
rlnt
added a commit
that referenced
this pull request
Jun 20, 2026
Co-authored-by: Relentless <16513358+rlnt@users.noreply.github.com>
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.
When a requester is connected to a new network, the item/fluid counts it has cached are not updated.
In particular, this is exposed when you disconnect your requesters (e.g., using a toggle bus) to disable them.
You have over the request amount before disconnecting. Then you use some. Now, when you reconnect them, it thinks it still has enough and does not request more.
Proposed Changes
Added a recompuation of the cached item/fluid amounts when a new watcher is attached using updateWatcher.
Additional Notes
I targeted 1.20.1-forge here because that is the version I need for the pack(s) I play.
The fix cleanly applies to all versions in this repo, so it can be cherry-picked over.
I also have branches for all versions in my fork if that helps.
I know you don't really support this version anymore, but I would really appreciate an official build.