Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Jan 20, 2026

The jei.RecipeRegistryMixin was unconditionally loaded in the client mixin set, causing crashes when JEI is not installed (JEI is declared as an optional dependency via after:jei).

Changes

  • Created GregTechEnergisticsMixinPlugin: Implements IMixinConfigPlugin to conditionally load mixins based on Loader.isModLoaded("jei")
  • Updated mixin config: Added plugin reference to mixins.gregtechenergistics.json
  • Convention: JEI-specific mixins in the .jei subpackage are gated; all other mixins load unconditionally
@Override
public boolean shouldApplyMixin(String targetClassName, String mixinClassName) {
    String jeiMixinPackage = mixinPackage + JEI_PACKAGE_SUFFIX;
    if (mixinClassName.startsWith(jeiMixinPackage)) {
        return Loader.isModLoaded(JEI_MOD_ID);
    }
    return true;
}

The plugin derives the JEI package dynamically from the mixinPackage parameter, making it resilient to package refactoring.


💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

Copilot AI and others added 5 commits January 20, 2026 08:28
Co-authored-by: solidDoWant <16456946+solidDoWant@users.noreply.github.com>
Co-authored-by: solidDoWant <16456946+solidDoWant@users.noreply.github.com>
Co-authored-by: solidDoWant <16456946+solidDoWant@users.noreply.github.com>
Co-authored-by: solidDoWant <16456946+solidDoWant@users.noreply.github.com>
Co-authored-by: solidDoWant <16456946+solidDoWant@users.noreply.github.com>
Copy link
Contributor Author

Copilot AI commented Jan 20, 2026

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • nexus.gtnewhorizons.com
    • Triggering command: /usr/lib/jvm/temurin-17-jdk-amd64/bin/java /usr/lib/jvm/temurin-17-jdk-amd64/bin/java --add-opens=java.base/java.util=ALL-UNNAMED --add-opens=java.base/java.lang=ALL-UNNAMED --add-opens=java.base/java.lang.invoke=ALL-UNNAMED --add-opens=java.prefs/java.util.prefs=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED --add-exports=jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED --add-opens=java.base/java.nio.charset=ALL-UNNAMED --add-opens=java.base/java.net=ALL-UNNAMED --add-opens=java.base/java.util.concurrent.atomic=ALL-UNNAMED -Xmx5G -Dfile.encoding=UTF-8 -Duser.country -Duser.language=en -Duser.variant -cp /home/REDACTED/.gradle/wrapper/dists/gradle-8.9-bin/90cnw93cvbtalezasaz0blq0a/gradle-8.9/lib/gradle-daemon-main-8.9.jar -javaagent:/home/REDACTED/.gradle/wrapper/dists/gradle-8.9-bin/90cnw93cvbtalezasaz0blq0a/gradle-8.9/lib/agents/gradle-instrumentation-agent-8.9.jar org.gradle.launcher.daemon.bootstrap.GradleDaemon 8.9 (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Fix fluid encoder JEI support based on review feedback Gate JEI mixin behind mod presence check to prevent crashes without JEI Jan 20, 2026
Copilot AI requested a review from solidDoWant January 20, 2026 08:32
@solidDoWant solidDoWant marked this pull request as ready for review January 20, 2026 08:33
@solidDoWant solidDoWant merged commit d1d492f into fix/jei-plugin-loading-1 Jan 20, 2026
solidDoWant added a commit that referenced this pull request Jan 20, 2026
* try mixin approach

Signed-off-by: solidDoWant <fred.heinecke@yahoo.com>

* remove d ebug code

Signed-off-by: solidDoWant <fred.heinecke@yahoo.com>

* Fix hasInputFluids check to prevent shaped recipe compression (#14)

* Initial plan

* Fix hasInputFluids and hasOutputFluids calculation

Co-authored-by: solidDoWant <16456946+solidDoWant@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: solidDoWant <16456946+solidDoWant@users.noreply.github.com>

* rm dead code

Signed-off-by: solidDoWant <fred.heinecke@yahoo.com>

* rm old import, warning

Signed-off-by: solidDoWant <fred.heinecke@yahoo.com>

* address PR comments

Signed-off-by: solidDoWant <fred.heinecke@yahoo.com>

* Gate JEI mixin behind mod presence check to prevent crashes without JEI (#15)

* Initial plan

* Add IMixinConfigPlugin to gate JEI mixin behind mod presence check

Co-authored-by: solidDoWant <16456946+solidDoWant@users.noreply.github.com>

* Use startsWith for more precise JEI mixin package detection

Co-authored-by: solidDoWant <16456946+solidDoWant@users.noreply.github.com>

* Make JEI package detection more robust using mixinPackage parameter

Co-authored-by: solidDoWant <16456946+solidDoWant@users.noreply.github.com>

* Extract JEI constants and fix formatting

Co-authored-by: solidDoWant <16456946+solidDoWant@users.noreply.github.com>

* Add documentation for JEI package convention

Co-authored-by: solidDoWant <16456946+solidDoWant@users.noreply.github.com>

---------

Co-authored-by: copilot-swe-agent[bot] <198982749+Copilot@users.noreply.github.com>
Co-authored-by: solidDoWant <16456946+solidDoWant@users.noreply.github.com>

* fix import

Signed-off-by: solidDoWant <fred.heinecke@yahoo.com>

* Statically init GT_ENERGISTICS_HANDLER

Signed-off-by: solidDoWant <fred.heinecke@yahoo.com>

---------

Signed-off-by: solidDoWant <fred.heinecke@yahoo.com>
Co-authored-by: Copilot <198982749+Copilot@users.noreply.github.com>
Co-authored-by: solidDoWant <16456946+solidDoWant@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants