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 1e30f34 commit bb71af1
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@

public class ModonomiconJeiIntegrationImpl implements ModonomiconJeiIntegration {
public boolean isLoaded() {
return Services.PLATFORM.isModLoaded("jei");
return Services.PLATFORM.isModLoaded("jei") && ModonomiconJeiPlugin.isRuntimeAvailable();
}

public boolean isRecipesGuiOpen() {
Expand Down Expand Up @@ -74,6 +74,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 bb71af1

Please sign in to comment.