BuildCraft|Core

BuildCraft|Core

7M Downloads

BC pipes lose liquid when different fluids mix in them.

User12123 opened this issue ยท 14 comments

commented

Ran into this using the Regrowth modpack. This happened in the following modpack versions: .64, .65 and .71

Here is my repo.

This is a contrived example to showcase the bug. I have had this happen in more normal operations.

Smeltery drain. Wooden pipe output to casting table with warmed up redstone engine powering pipe. Put hopper under the table to pull out ingots as they are made.

Take ingot cast out of table.

Melt an ingot of 5 different metals that won't mix or pour into a table with no cast in it. I used for this test aluminum brass (made sure it melted last), iron, tin, bronze, and obsidian.

As the metals melt it fills the pipe but can't go anywhere. Once pipe is full place ingot cast in table. Watch ingots get made and wait for an ingot to not finish. In my test it was the second ingot that failed.

Wrench the pipe to reverse flow back into smeltery. Once in smeltery you can see how much of the ingots you have left.

In my test of the 4 metals piped back to smeltery I had the following quantities. 3 nuggets, 80 mB, 3 nuggets, and 1 ingot 4 nuggets 15 mB. So three metals were partially lost and one metal gained some volume.

commented

I have experienced losing small amounts of liquids even without mixing anything. My first take on the Regrowth pack I got to the point where I had collected some oil and wanted to produce fuel. After refining a few buckets I was left with less than that amount of fuel. It was less than 100 mB that vanished, but still noticeable and definitely a problem if you try to use BC pipes for automating e.g. the TiC Smeltery or Mariculture Crucible. I can try redoing my experiment with the oil/fuel/refinery setup if you want more details?

commented

@Silwing perhaps the oil was still in the refinary, only on one of the tanks and since it was so little it didn't even render.

commented

It may only be a problem with some kinds of tanks. I just did some further testing with simply piping oil between Mariculture tanks in Regrowth... I tried with both wooden and emerald pipes as extractors and both wooden engines and autarchic iron gates. The wooden pipe seem to consistently lose < 100 mB of oil. Whereas the emerald pipe sometimes lose liquid and sometimes not. Gate or engine for extraction does not seem to matter. I went on to test with Mekanism portable tanks instead of Mariculture tanks and over approx. the same amount of tries I never lost any liquids with those tanks (tried both wooden pipes and emerald pipes).

I think I did approximately 20 transfers for each type of test.

I also retested the refinery with both Mariculture tanks and Mekanism portable tanks. Again the Mariculture tank is missing < 100 mB of fuel, while the Mekanism portable tank did not lose anything.

commented

Okay, I sent an experimental version to a tester which sanitizes fluid types more in the wooden fluid pipe. If that fixes it, it was our fault; if not, it is 99% likely to be a TCon bug.

commented
commented

By the way - the Mariculture bug is a WAILA syncing issue.

commented
commented

Our fault after all. Worked around in 6.4.7.

commented

Thanks for your work on this. =)

commented

Awesome you found a work-around :) thanks a lot.

commented

@User12123 - that's a good one! An initial look at the code shows no place where liquid could get lost or gained. This will take time to debug...

Generally, BC pipes were never designed for transferring multiple liquids at the same time.

commented

I was surprised when I saw the pipe letting multiple fluids in at once.

I don't know the code at all but I think a fix would be to not let pipes have more than one type of fluid in it.

commented
commented

BC fluid pipes are made out of up to 7 internal tanks - one for each side + center. Fluid should simply not mix in them, thus why it's so weird to me!