Skip to content

Recompute cached resource amounts when StackWatcher updates#62

Merged
rlnt merged 2 commits into
AlmostReliable:1.20.1-forgefrom
Simon04090:1.20.1-forge
Jun 20, 2026
Merged

Recompute cached resource amounts when StackWatcher updates#62
rlnt merged 2 commits into
AlmostReliable:1.20.1-forgefrom
Simon04090:1.20.1-forge

Conversation

@Simon04090

Copy link
Copy Markdown
Contributor

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.

Fixes stale cached values when the requester switches networks.
@rlnt

rlnt commented Jun 12, 2026

Copy link
Copy Markdown
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 rlnt changed the title Recompute cached item/fluid amounts when StackWatcher updates. Recompute cached resource amounts when StackWatcher updates Jun 12, 2026
@rlnt rlnt merged commit b3b5c70 into AlmostReliable:1.20.1-forge Jun 20, 2026
rlnt added a commit that referenced this pull request Jun 20, 2026
Co-authored-by: Relentless <16513358+rlnt@users.noreply.github.com>
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