Compatibility - Please name your Forge fluids "liquidoxygen" and "liquidhydrogen"
radfast opened this issue ยท 5 comments
Hey guys. In case you don't know me, I'm co-dev of Galacticraft, working with micdoodle8. We like to have 100% compatibility between Galacticraft and Mekanism, as these two mods go back a long way together.
Mekanism is currently registering liquid oxygen and liquid hydrogen as Forge fluids with the names "oxygen" and "hydrogen".
This is causing a problem for Galacticraft, and probably for other mods as well. The reason is that Galacticraft (and some other mods like MineChem) register oxygen gas as a Forge fluid with the name "oxygen", and similarly hydrogen gas is a Forge fluid with the name "hydrogen". So when our Galacticraft machines should be producing oxygen gas, they can actually end up producing Mekanism's liquid oxygen instead if Mekanism is present.
For liquid oxygen we create another Forge fluid with the name "liquidoxygen", and the same for liquid hydrogen. I am requesting and hoping to persuade you to do the same, for 100% compatibility! It's just a single internal name change your side, you'd also need to update the fluid.oxygen and fluid.hydrogen keys in your .lang files to match...
Mekanism has its own system for gases, but other mods use the Forge fluid system for gases as well as for liquids (you can set the density of the Forge fluid to be very low - Minechem actually uses negative densitites for some gases). In normal English usage both liquids and gases are "fluids". :)
One question about the "simple" change, do fluids which are currently in a save remain after a name change? I'm not so well known with fluid registries. If that's the case, or easily migrated, then I think it will be a good change.
There is a minor note, 1.7.10 isn't officially supported anymore....
Also I'm a supporter of the Forge fluid registry for gasses for optimal cross mod compability.
One question about the "simple" change, do fluids which are currently in a save remain after a name change?
Currently if Galacticraft (or any other mod which has already, ahead of Mekanism, registered a fluid with the name "oxygen") is present, then Mekanism's fluid is not present in the game anyhow in 1.7.10, the Mekanism fluid registration will simply fail because the FluidRegistry sees the fluid name is already registered. So the name change should not result in any item / fluid loss, in any world where other mods with this fluid are also present.
So a neat solution could be for Mekanism to use the name "liquidoxygen" if it finds a fluid with the name "oxygen" is already registered. (I'm not sure what you would do about the .lang file in that situation, maybe provide a key for both?)
In 1.8.9+ there is a more complex system involving Forge's masterFluidReference and a "default" fluid for each name.
There is a minor note, 1.7.10 isn't officially supported anymore....
The issue arises in all later MC versions as well, subject to slightly better handling in Forge because of the masterFluidReference, but it's basically still going to be a problem whenever mods are using the same name for different fluids.