Currently, the isGaseous flag controls rendering only, and can be confusing (see #3753 #3746 ). The manner in which it is implemented is also odd, as there is no reason a positive density fluid cannot be a gas (for instance, Sulfur Hexaflouride is much heavier than atmospheric air, and would float downwards). There have been discussions previously on refining the implementation in several other issues (including #3753 ), this issue exists to have a centralized issue for discussion and implementation.
Personally, I see four cases to support:
Fluid with positive density, isGaseous() = false
These are standard fluids, like water and lava. This should be the standard vanilla implementation.
Fluid with negative density, isGaseous() = false
These are more fantastic fluids, upside-down waterfalls and the like. These would be vanilla like, but flow upwards. They can still be carried in buckets, using the upside-down bucket model already existing. From a coding standpoint, these would render in tanks and GUIs like vanilla fluids, but from the top first instead of the bottom first (some mods already render isGaseous with this method).
Fluid with positive density, isGaseous() = true
Gaseous fluids that are "heavier than air", these would expand to fill a large area and have the source blocks "float" downwards. From a coding standpoint, these would use an alpha/opacity-based rendering rather than a level rendering.
Fluid with negative density, isGaseous() = true
Gaseous fluids that are "lighter than air", these would also expand to fill a large area, but have the source block "float" upwards. Like the previous gas, these would also use an alpha/opacity-based rendering, but honestly this implementation is more dependent on how the mod author implements their world block as it isn't much different than the previous case from a coding standpoint. But I'm sure certain mods would consider using the density flags in interesting ways.
The isGaseous flag should only be used for true gasses, as mods can choose to handle gasses much differently than other fluids. Mekanism is an example of a mod that implements their own gas API due to Forge's implementation being lacking.
I agree with your cases, but should emphasize that Mekanism is an example of a mod that implements an API for the sake of implementing an API. Forge has fluids for a reason - both liquids and gases fall under fluids.
Fluids are slated for full rewrite in 1.13 along with the rest of Forge.
I should probably point out that Mekanism is not the only mod that does that. Flaxbeard's Steam Power is a good example of a mod that created its own gas implementation as it wouldn't work in the confines of Forge's fluid implementation.
I have yet to be told a functional difference between gasses and our implementation of fluids.
Yes they behave slightly differently in the real world. But in the contraints of the Minecraft world they are functionally identical.
The main potential difference is that gasses are forced to be a 'finite fluid' where it tries to reach a equilibrium with the blocks around it instead of having one defined 'source'.
The only other issue is rendering, does it fill the entire block, or only parts of the block? Both are valid cases only difference being how thin the gas can spread itself out.
As king said, there is a reason why our system is called FLUIDs not Liquids/Gasses. If you have any functional differences they can be discussed and considered for 1.13.
But as I said, i've yet to see any functional difference between the two.
Just a random question, I know it makes harder working with fluids but isGaseous() = true and negative density fluids should flow sidewise too not only upwards. Gases - as we know - try to fill all available space. While rendering them THIS way is too hard, combining flowing up and towards should try to at least give a hint for this principle. Minecraft physics does not need to follow real-world physics - but I don't see anything wrong if it tries to.
Alternatively, upward flowing blocks should infect next air blocks with some alpha-rendering....
This issue has been automatically marked as stale because it has not had activity in a long time. If this issue is still relevant and should remain open, please reply with a short explanation (e.g. "I have checked the code and this issue is still relevant because ___." or "Here's a screenshot of this issue on the latest version"). Thank you for your contributions!
This issue has been automatically closed because it has not had activity in a long time. Please feel free to reopen it or create a new issue.
Most helpful comment
I have yet to be told a functional difference between gasses and our implementation of fluids.
Yes they behave slightly differently in the real world. But in the contraints of the Minecraft world they are functionally identical.
The main potential difference is that gasses are forced to be a 'finite fluid' where it tries to reach a equilibrium with the blocks around it instead of having one defined 'source'.
The only other issue is rendering, does it fill the entire block, or only parts of the block? Both are valid cases only difference being how thin the gas can spread itself out.
As king said, there is a reason why our system is called FLUIDs not Liquids/Gasses. If you have any functional differences they can be discussed and considered for 1.13.
But as I said, i've yet to see any functional difference between the two.