Mekanism liquid fuels not working
NathanDSimon opened this issue ยท 4 comments
Describe the bug
Mekanism's liquid fuels (i.e. liquid ethylene and hydrogen) aren't working with the liquid compressor. Occasionally they will display in the available fuels tab as intended (and occasionally they won't) but in either case the compressor won't accept them. The kerosene lamp does display the check mark when filled with these fluids but doesn't burn them (and doesn't produce light). Oddly, filling the kerosene lamp with water or some other invalid fuel, then draining it and filling it with hydrogen or ethylene whilst it is performing the draining animation causes the lamp to burn forever, without consuming any of the fuel.
How to reproduce the bug
In any world, place the fluid compressor; attempts to fill it with liquid hydrogen or liquid ethylene will fail, even if they are displayed in the fluid fuels tab.
Expected behavior
The compressor should accept the fluids as described in the wiki and implied in the fuel tab.
Additional details
I've done a bit of digging and I think that Mekanism doesn't explicitly define fluid forms of gases as their own classes, instead using a factory to generate them. If Pneumaticcraft loads before Mekanism does, I'm fairly sure the registry won't contain the fluid.
Notably, other modded fluids in the pack that are inserted as fuels (namely Allthemodium's soul lava) are working as intended. You may need to validate the fluid stack based on whether it contains an NBT tag that matches a fuel, rather than using the == operator as is currently being done.
Which Minecraft version are you using?
1.18
Crash log
No response
Good catch, although the fix is actually simpler - my recipe condition for checking the presence of fluid tags hadn't been updated to use the new Forge API (boolean test(IContext)
). Tag checking is more timing-sensitive now, and it's necessary to use the forge-provided context for getting the existing fluid tag collection.
(PNC fuel recipes for Mekanism fluids are done via the forge:ethene
and forge:hydrogen
fluid tags, not via direct fluid comparison).
Yeah, deprecated APIs do be that way ๐
It's sort of force of habit for me to check all the deets before posting any sort of unhelpful bug request since I work in cloud platform support, so this sort of thing is literally my job XD
I wonder if the kerosene lamp quirk is related to that too? It was just a sort of incidental thing I noticed when gathering data, so I didn't actually check the code relevant to that one yet.
Yeah, almost certainly, it all goes through the fuel quality recipes. Anyhow, seems to be working well now I've updated to the 1.18.2 API, so next release should resolve that problem...