Ender IO Zoo

Ender IO Zoo

962k Downloads

Liquid loss with Deep Resonance and pressurized fluid pipes

McJty opened this issue ยท 10 comments

commented

Issue Description:

Given this setup:

http://i.imgur.com/9Gs2Oms.png

So liquid starts at the top double tank. It gets purified by the purifier on the right, when it is pure enough it goes through the valve to the bottom-right tank. There a pressurized fluid pipe brings it to the left tank.

Without acceleration wand this goes ok. But if the purifier is accelerated with the acceleration wand then a lot of liquid is lost.

However! This does not happen if the pressurized fluid pipes are replaced with ender fluid pipes!

Any clues? Can be bug in DR and/or EnderIO. But would like to understand what the ender pipes do differently from the pressurized pipes that could affect this

What happens:

Fluid loss

What you expected to happen:

No fluid loss

Steps to reproduce:

  1. Make the setup above
  2. Put RCL liquid in top tank
  3. Put filter in purifier
  4. Use acceleration wand on purifier constantly

Affected Versions (Do not use "latest"):

Minecraft 1.10.2: EnderIO versions affected: all as far as I can see

Also linked from: McJtyMods/DeepResonance#123

commented

Ender fluid conduits have no tank - they teleport from source tank to destination tank.
The other fluid conduits first extract into them self and then try to push to other tanks.

commented

That's why we reject tick acceleration by default. I'm kinda surprised it has an effect here. But I'll look into it.

The diff is that the ender pipes have no internal tanks, so the always do direct transfers between source and target block

commented

Um, if you speed up the purifier, how does that relate to the conduit? The conduit is talking to your tank---both are not sped up.

I checked our conduit code, there's no tick-dependent code in either the fill() or the extract() path.

commented

The only thing that changes when the purifier is sped up is that the liquid is pumped into the bottom tank faster. But yes, it is strange really

commented

I'd recommend to add a println(ticknumber, old, new, change) to the fill and drain of the tank to see what's happening. helped me really quick with a liquid loss prob in our tank.

commented

yes, I will do this later

commented

Ok, not 100% sure what is happening but I think I have a clue in the direction this is going. The liquid that is being handled here is a bit special in that it has special properties that are stored in the NBT. So a 10%/10%/10% is different from a 11%/10%/10% liquid. The deep resonance tanks can mix liquids to produce correct amounts but of course pipes from other mods (like yours) can't do that.

Ok, so what the purifier is doing is changing the stats on the liquid. If it is accelerated this happens faster and so the properties of the liquid in the bottom tank change faster. It appears that if these properties change too fast then sometimes the enderio pipes try to drain the liquid with a different stat and that fails. I'm not sure yet on which side this problem is but I'm checking it out further now.

commented

So in summary. Tank.drain() is called by the pressurized pipe even though the liquid it has in the pipe is not compatible with the liquid that is in the tank due to different stats

commented

It is normal that conduits ask for the type of liquid they already hold and expect the tank to check the type. As the tank already needs to do that, getting and checking the tank properties first would just be extra unnecessary load on the tick. However, that should not lead to lost liquid, unless the tank does not do the check AND the tank does not accept back-flow (we do an additional check and put the liquid back if the tank returned something different than we asked for).

Um, seems that's what happens here...you tanks are very sided, I remember...

commented

We found the issue. Bad fluid equality test in our drain() method.