omeranha / MekaWeapons

an unofficial addon for Mekanism
https://www.curseforge.com/minecraft/mc-mods/mekanism-weapons
MIT License
2 stars 5 forks source link

Fix for Issue #10 and Improved Compatibility with Other Addons #11

Closed Lapis256 closed 7 months ago

Lapis256 commented 8 months ago

This pull request addresses the mod crash issue described in Issue #10. The root cause seems to be the lack of compatibility with Ad Astra: Giselle Addon v6.4.

The main issue stems from the reimplementation of the module container addition process. This reimplementation necessitates re-registering all modules, including those added by addons, which leads to decreased compatibility with other mods.

For example, modules added by the Gravitational Modulating Additional Unit are not re-registered and thus cannot be used.

To resolve this, I have changed the approach by using Mixin to inject code at the end of the Mekanism module container registration process. This eliminates the need for reimplementation, simplifies the code, and enhances compatibility with other addons.

I welcome feedback and further discussion. I hope this pull request will contribute positively to the project.

Thank you.

omeranha commented 7 months ago

Hi! sorry for delayed response, thank you very much for your commit, let me explain now just made a quick comment to fix for Giselle's addon version 6.4 This will probably be the last update for 1.20.1 if there are no more bugs. The creators of Mekanism (Pup to be more specific), made a commit and created API functions to create items with modules more easily, but it will only be released for 1.20.4 I want to develop more features but i'm kinda out of time and I'm gonna wait for 1.20.4 release of mods

gisellevonbingen commented 7 months ago

Sorry I can't understand why this mod was calling 'sendModuleIMC' with other mods modules manually. This pull request is good change to consider another mekanism addon mod that will be released later what add new meaksuit modules.

omeranha commented 7 months ago

I spoke with pup again to check if there was any ETA on 1.20.4 release and they hope to release it as soon as possible, but I don't want my addon to cause more incompatibilities, I will test the pull request to ensure it works and merge it

omeranha commented 7 months ago

everything seens fine, thank you very much for your time and contribution