Just Enough Items (JEI)

Just Enough Items (JEI)

387M Downloads

[Bug]: JEI 11.5.0 and up JeiRuntime functions return dummy objects when onRuntimeAvailable is triggered

r8420 opened this issue ยท 4 comments

commented

Steps to Reproduce the Bug

I'm using the JEI integration for my mod and since JEI 11.5.0 (1.19.2) I'm having issues getting the IngredientListOverlay and IngredientFilter. The getIngredientListOverlay() and getIngredientFilter() functions should not return dummy objects when onRuntimeAvailable is triggered or is this a intentional change? In previous versions I did not have any issues.

    @Override
    public void onRuntimeAvailable(@Nonnull IJeiRuntime jeiRuntime) {
        overlay = jeiRuntime.getIngredientListOverlay();
        filter = jeiRuntime.getIngredientFilter();
        updateModule();
    }

They return a mezz.jei.library.gui.IngredientListOverlayDummy and mezz.jei.library.ingredients.IngredientFilterApiDummy.

Also, I also have to include the full JEI because the common and common-api doesn't contain the IngredientListOverlay since JEI 11.5.0 but that's probably irrelevant to this issue.

I don't have much knowledge of the JEI codebase so I'm not 100% sure if this is a bug or I'm doing something wrong but in previous versions this problem didn't occur.

This is the full code I'm using:
https://github.com/r8420/MoreOverlays-updated/blob/227c552b679c7b64589081e32215973aee3e7782/src/main/java/at/ridgo8/moreoverlays/itemsearch/JeiModule.java

Expected Behavior

The functions should not return a dummy when the get functions in JeiRuntime are called after onRuntimeAvailable is triggered.

Actual Behavior

The functions (for example: getIngredientListOverlay() and getIngredientFilter()) return a dummy when the get functions in JeiRuntime are called after onRuntimeAvailable is triggered.

Mod Pack URL (Optional)

No response

Mod Pack Version (Optional)

No response

Extra Notes (Optional)

No response

latest.log

No response

commented

I've come up with a temporary solution of waiting to get the IngredientListOverlay until the GUI opens.

commented

Thanks for the report!
This should be fixed in the next build of JEI.
There is an issue with the build system right now so it may take a few days before it is released.

commented

This fix for this has been released now

commented

Thank you very much