Move out larvae from splicer even when no serum is present anymore #76
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.
For GTNewHorizons/GT-New-Horizons-Modpack#22432
Current logic that the larvae only gets moved into the finished area once there is a serum that can't be applied anymore. This kinda makes sense, since it prevents moving larvae into the finished slot if they didn't get processed yet.
But that means it won't move larvae once the serum runs out, which doesn't sound like behavior we want. This PR attempts to address that, by tracking the stack that got worked on, and allowing moving out larvae once the serum runs out - but only if they got worked on.
This is a bit more complicated, since the user can, at any point, remove the larvae from the target (middle) slot and it gets refilled, which happens in the same tick. I simply check if it's a different larvae, and then reset the workedOnStack. If the finished larvae gets replaced by an identical larvae (which should be super rare) it is allowed to be moved out, since I can't differentiate this. Seems fine to me though.