GregTechCEu / GregTech-Modern

GregTech CE Unofficial for modern versions
GNU Lesser General Public License v3.0
268 stars 162 forks source link

EMI plugin doesn't load all thw way #1434

Closed KP2048 closed 3 months ago

KP2048 commented 3 months ago

Checked for existing issues

Tested latest version

GregTech CEu Version

1.3.0

Recipe Viewer Installed

EMI

Environment

Singleplayer

Cross-Mod Interaction

Yes

Other Installed Mods

Expected Behavior

the EMI plugin to load all the way and not error out

Actual Behavior

the plugin errors out here, and throws an IllegalStateException, because remove has been called on iterator before you call set https://github.com/GregTechCEu/GregTech-Modern/blob/5d061c7595a51d1ac5ad671ba178e370656dca70/src/main/java/com/gregtechceu/gtceu/api/capability/recipe/ItemRecipeCapability.java#L501

Steps to Reproduce

I don't know if another mod is inadvertently causing this, but as the pack I am making is unreleased, I can put a curseforge zip here. It happens when gregtech loads the EMI plugin

Additional Information

edit: JAOPCAGTCEu seems to be what is triggering the issue, but regardless the way you are calling set is unsafe