desht / ModularRouters

A Forge Mod for item routers with pluggable modules
18 stars 20 forks source link

Mc1.19.2 mekanism dev #182

Closed jpeaglesandkatz closed 8 months ago

jpeaglesandkatz commented 1 year ago

Seems to be working, no pipe (tube) connection so that hampers the usability quiet a bit. I think the JEI recipe doesn't work yet.

I'm seeing some strange behaviour connecting to certain mekanism 'machines... Like the thermal evaporation plants where even the native fluid modules don't really seem to do what they are supposed to.

So not sure what is going on there but should probably shelf any of this until it is more clear what is happenign.

Anyways, the gas transfers do seem to work (most of the time) see above..

desht commented 1 year ago

Thanks for this, but there's one big problem I can see immediately: you have introduced a hard dependency on Mekanism by adding gas handler code into the core tile entity and ModItems classes. Any Mek support must be a soft dependency, i.e. the mod must work without Mekanism installed.

This is more difficult, I appreciate, but I can't accept a PR that adds a hard dependency like this. I would start by isolating anything Mekanism-specific into its own package (e.g. me.desht.modularrouters.integration.mekanism) and ensuring code in there is only called when Mekanism is loaded. That may require introducing some callback-style hooks in the main code which can be registered at init if Mek is present, and will definitely also require dynamically attaching the Mek gas handling capability to the router tile entity via the Forge AttachCapabilitiesEvent (I do something similar in PneumaticCraft for Mek heat integration).

jpeaglesandkatz commented 1 year ago

That is totally cool and I already figured as much. This was more of learning experience for me anyways. It will take time.. Small steps hehe... At least learned quite a bit compared to a week or two weeks ago...