Fluid Conduits - Iterate fluid tanks #840
No reviewers
Labels
No labels
Area-Assets
Area-Backend
Area-Conduits
Area-Datapacks
Area-Lang
Area-Mod Compat
Area-Parity
Area-Rendering
Good first issue
MC-1.19.2
MC-1.20.1
MC-1.20.4
MC-1.20.6
MC-1.21
MC-1.21.1
Modtoberfest
P-0-High
P-1-Medium
P-2-Low
Status-Awaiting Response
Status-Behind-Flag
Status-Blocked
Status-Cannot Reproduce
Status-Duplicate
Status-Help Wanted
Status-Incomplete Report
Status-Invalid
Status-Needs LTS Backport
Status-Needs Updating
Status-Stale
Status-To Implement
Status-Triage
Status-Wontfix
Status-Wontmerge
Type-Backport
Type-Bug
Type-Documentation
Type-Enhancement
Type-Question
Type-RFC
Type-Suggestion
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference: Team-EnderIO/EnderIO#840
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "release/1.20.1"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Description
Changes the single extract for (non-locked) fluid conduits to an iteration over all the stored fluids. Should fix #791 (without needing anything on gregtech's side), and more significantly, fluid filters disabling conduits in some cases with a non-filtered fluid in the container. (Couldn't find an issue for that one.)
Not sure what the status is on 1.21, I saw there was a conduit-related PR recently but it didn't seem to touch the logic here.
(The iterative approach is referenced from ae2, so I assume it's probably a correct thing to do.)
Could you describe the problem that you are trying to solve here? The issue you've linked is confirmed to be a Greg Tech issue, so im not sure why you've made this change.
IFluidHandler#drainis designed to allow the underlying fluid handler to decide how to extract from the tanks - if a mod isn't implementing that correctly then it's that mod's problem to be honest, it exists to avoid us needing to add additional logic to loop over the tanks.Also, I will move the base branch to lts/1.20.1 for you, as that's where we do work on the mod :) (which reminds me I should get rid of release/1.20.1 like I did for 1.21)
The main issue this fixes is with fluid filters. As you said,
IFluidHandler#drainwill allow the underlying fluid handler to decide what fluid to provide. But if you had a tank with both water and lava in it and want to extract the lava, it might provide water every time you calldrain, which wouldn't match the lava filter. With the current implementation, it would just stop there and fail to extract anything - that's what this fixes.After thinking about this, I think I'm happy with this approach. Thank you.