minetest
minetest copied to clipboard
liquid flow leaves an air gap before reaching the end of another liquid flow
Minetest version
5.5.1
Summary
When a liquid flow reaches the end of a different liquid flow, it doesn't spread to the air node inbetween.
This only happen in specific directions.
Steps to reproduce
- place on liquid on a flat surface
- wait for it to fully flow
- place second liquid close enough in each directions
tested with the void game in a flat world, with this custom mod : void_liquid.zip
similar issue : https://github.com/minetest/minetest/issues/2399
I don't remember this being a problem. Would you please be so nice to check if it worked in 5.0.1 or other version? Try to bisect if possible. It's been a while since the last liquid changes.
same issue in 5.0.1
I think this – or something similar – also happens in 5.4.1 at least.
I don't remember this being a problem.
The problem created by this is that player-built machinery that relies on liquids touching for something to happen may only work in some directions. Most prominently, this probably affects cobble generators across a wide range of games where flowing lava and flowinrg water can touch to form cobble.
can confirm this issue
Lava can flow into flowing water and creating stone in only two orthogonal directions, in the opposite directions the lava will not flow.
Minetest 5.6.1 Minetest Game 5.6.1
Also does this in MineClone, so it seems like an engine bug.
There is another bug/glitch that seems related: It is possible to place a solid node near the player's head in such a way that it clips the player's head into the node, resulting in x ray vision. This also only works only in two orthogonal directions, not in the opposite directions, just like the lava flow pictured above.
Edit: the x ray glitch is reported in https://github.com/minetest/minetest/issues/12429
can confirm this occurs for me too
I think I have an idea what's causing this: it might be related to the fact that the transform liquids function scans neighbors in a particular order (+y, +z, +x, -z, -x, -y)
and picks the first liquid neighbor it finds as the source of what should flow into the empty/air node - and doesn't select any of the other neighbors as candidates to flow in. The check whether the neighbor has enough liquid level to flow into the current node doesn't happen till later, and then if it fails, it won't retry.
If this is right, the issue should happen when there's a max-distance (aka min level) liquid on the +z/+x/-z side first before any other liquid - and from what I tested, this is the case. I'm going to try something to fix this to make sure.
So that was the cause, and I think I got a fix, this is how it looks now with OPs mod/setup:
Just need to make sure it doesn't break anything else before making a PR
Also to note, I don't think the Seeing through blocks glitch bug mentioned above is at all related.
This bug was caused purely by water update logic, that bug likely has nothing to do with that logic.