[issue] bad handling of fluid in tree recipe crafting mode
jonatjano opened this issue ยท 8 comments
issue
When using EMI tree recipe crafting mode with fluid and looking into a machine with the requested fluid, it is not detected and EMI says that I can't craft any batch of the item
In the below screenshot using Modern Industrialisation to illustrate the issue, the recipe asks for 1mb of lubricant and the machine currently holds 3909mb of lubricant
expected behavior
I expect that the liquid in the machine is detected and that EMI tells me I can use it to craft the recipe
version
Neoforge : 21.0.148
EMI : 1.1.10+1.21+neoforge
Modern Industrialization : 2.2.16-beta
additional information
I also opened an issue on Modern Industrialization's github, thinking their side had to allow EMI to read that slot and they told me the issue is EMI lacking an handling of fluid
MI is not exposing their input slots as part of their inventory, as is necessary for EMI to assume you have lubricant and assume this is craftable.
@emilyploszaj how am I supposed to expose fluid slots?
@emilyploszaj sorry to bother, but I'll allow myself to send you a ping so you know Technici4n is waiting for an answer
You need to override getInventory
to expose your inputs inside the inventory. You can use a similar approach of collecting your slots and getting their contents and additionally add all fluid contents. @Technici4n
That does not actually work for #craft
. EmiRecipeFiller#getStacks
will try to find fluid ingredients in the input sources, and of course that will fail. Interestingly, #canCraft
does however succeed. ๐
This is what I tried: AztechMC/Modern-Industrialization@10a356a.
Well, yeah, any complex (non-standard) recipe filling will require manual work, MI is going to need to handle moving items for crafts. I assumed you already had this since you handle + filling yourself.
Could EMI maybe move items only and ignore fluids? I'd prefer not to reimplement the whole thing myself ๐