Fluid conduits not extracting from a machine with multiple outputs
Tfarcenim opened this issue ยท 6 comments
Issue Description:
When attempting to extract from a machine with multiple fluid outputs and using a filter, the conduit extracts nothing.
What happens:
If the filter is set to pull anything but the first fluid in the machine, it does nothing.
What you expected to happen:
For the fluid to be extracted
Steps to reproduce:
-
Get a machine that can output multiple fluids such as a nuclearcraft electrolyzer.
-
Let the machine run until it produces multiple fluid outputs. (eg water to hydrogen, deuterium and oxygen)
-
Set up a fluid filter to extract any liquid but the 1st (deuterium, oxygen)
-
Watch as it does nothing
Affected Versions (Do not use "latest"):
- EnderIO: 5.0.39
- EnderCore: 0.5.43
- Minecraft: 1.12.2
- Forge: 2796
- SpongeForge? no
- Optifine? no
- Single Player and/or Server? single player
Your most recent log file where the issue was present:
Images:
https://cdn.discordapp.com/attachments/425461908716519425/532350043689058335/2019-01-08_19.07.22.png https://cdn.discordapp.com/attachments/425461908716519425/532350102027632669/2019-01-08_19.08.53.png https://cdn.discordapp.com/attachments/425461908716519425/532350149423398922/2019-01-08_19.09.05.png
Yes, the fluid-sensitive drain method and getTankProperties expose all tanks. I believe BuildCraft uses the IFluidTankProperties array in order to determine which tank to pull from.
Tossing this in --
I was working with a NuclearCraft tile, which contained two tanks of FluidA, and two tanks of FluidB. I placed a Thermal Expansion fluid pipe to extract, and whitelisted FluidB. Turned it on, and it categorically and stubbornly refused to do anything.
Only after FluidA was cleared from tanks one and two, would FluidB be extracted.
Thinking about this, I'm not wholly convinced that I'm adding anything useful. The fact that both EnderIO and ThermalExpansion are affected equally makes things seem to be in NC's court. Or maybe not.
seem to be in NC's court
Not really. There are 2 ways of extracting fluids from a tank:
- Ask the tank what it can give you, filter that, transport it.
- Read the tank's content list, look at the fluids, filter them, decide what to transport, ask the tank for that specific fluid, find out if it can be extracted, transport it.
I think you can guess from the description which one we (and TE) implement...
PS: Number 2 not just is more work to implement, but also puts more stress on the game (tps!). And then there are very, very few blocks that have multiple output tanks.
@HenryLoenwind I've created PR #5168 which I hope will be acceptable.
I've taken care to address each of your concerns:
- To address performance issues, the "second way" of extracting fluids is only triggered if the original method can't transfer anything.
- To address the rarity of multiple output tanks, the network caches whether a given NetworkTank has multiple tanks on connection.
For what it's worth, I encountered this issue while using the AE2 Fluid Interface. Because the mod creator has said that this is intentional (see AppliedEnergistics/Applied-Energistics-2#3959), it seems like supporting multiple output tanks is the intended way forward.