Skip to content

Commit

Permalink
fix: handle cases where jei is loaded, but its runtime is disabled (e…
Browse files Browse the repository at this point in the history
….g. with EMI present)

Closes #275
  • Loading branch information
klikli-dev committed Dec 31, 2024
1 parent 89e9447 commit cd3cfd2
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
public class ModonomiconJeiIntegration {

public static boolean isJeiLoaded() {
return Services.PLATFORM.isModLoaded("jei");
return Services.PLATFORM.isModLoaded("jei") && ModonomiconJeiPlugin.isRuntimeAvailable();
}

public static boolean isJEIRecipesGuiOpen() {
Expand Down Expand Up @@ -77,6 +77,10 @@ public static class ModonomiconJeiPlugin implements IModPlugin {

private static IJeiRuntime jeiRuntime;

public static boolean isRuntimeAvailable() {
return jeiRuntime != null;
}

@NotNull
@Override
public ResourceLocation getPluginUid() {
Expand Down

0 comments on commit cd3cfd2

Please sign in to comment.