Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: newly unpowered smart chutes don't ignore vault version tracker #6770

Conversation

VoidLeech
Copy link
Contributor

@VoidLeech VoidLeech commented Aug 3, 2024

Issues Fixed

Fixes #6154
Fixes #5867

Implemented Solution

At runtime, save an additional boolean in a ChuteBlockEntity that gets toggled when we toggle the powered state to off (in SmartChuteBlock):
If that's set to true, don't check whether we're still waiting on the versioned inventory tracker, just go through with the transfer attempt, then toggle it back to false so subsequent attempts to check the versioned inventory tracker aren't skipped.

This boolean doesn't need to be saved to disk I don't think, we seem to get a new versioned inventory tracker when the world is loaded that we can't yet be waiting on.
This does introduce some useless logic (a boolean comparison and setting a boolean to false) for normal chutes as the transferring logic is in ChuteBlockEntity, but at least we never toggle it to true for those.

@IThundxr IThundxr added pr type: fix PR fixes a bug pr flag: simple PR has minimal changes labels Aug 3, 2024
simibubi added a commit that referenced this pull request Aug 6, 2024
- Fixed powered smart chutes scanning inventories for extractable items / updating their version tracker #6154 #5867 #6770
@simibubi
Copy link
Collaborator

simibubi commented Aug 6, 2024

Thank you for the PR
The underlying issue has been addressed in 4d04a16

@simibubi simibubi closed this Aug 6, 2024
@VoidLeech VoidLeech deleted the mc1.18/no-version-locked-chutes branch August 6, 2024 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
pr flag: simple PR has minimal changes pr type: fix PR fixes a bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Smart Chutes & Vault & Redstone Smart Chute Bug
3 participants