SuperMartijn642 / TrashCans

2 stars 13 forks source link

[Bug] trashcans not showing up in JEI #46

Closed Saereth closed 1 week ago

Saereth commented 2 weeks ago

Version Info

Description of the Bug None of the trashcans are showing up in jei. They show up in the creative menu and if you spawn one in and check recipes the recipe is there/show but searching for it in JEI doesnt show up

SuperMartijn642 commented 2 weeks ago

Just Enough Items is supposed to show all items which appear in creative tabs/search. What you describe seems like a bug with JEI.

Saereth commented 2 weeks ago

this is happening with all of your mods specifically but most other mods like mekanism etc dont seem to be impacted. I can open an issue over there with Mezz as well if you suspect its on jei's side though np!

So far Entangled, item collectors and Trashcans dont show up in JEI but connected glass and simple magnets do

SuperMartijn642 commented 2 weeks ago

In 1.20.6, NeoForge added a creative tabs API which fires an event for each creative tab. The event then allows adding items to the respective creative tab. There are two ways to add an item to the creative search tab through the NeoForge API:

It appears JEI ignores the latter and does not display any items added to the search tab during the search tab's event.

In 1.20.6, I simply added items to any creative tabs with the PARENT_AND_SEARCH_TABS flag including the search tab. This meant items did end up showing in JEI by being added to the search tab through the other creative tabs. In 1.21.1, NeoForge changed it so their API throws an error when an item is added to the search tab and it is added to a creative tab with the PARENT_AND_SEARCH_TABS flag. As such, I add the items to any creative tabs with the PARENT_TAB_ONLY flag and also add them to the search tab. As JEI ignores any items added to the search tab directly, the items from my mods do not show up in JEI. I believe this is a bug with JEI. I am not sure if this behaviour from JEI is intentional, but it would seem somewhat odd to me.

Saereth commented 2 weeks ago

ok i've opened an issue over on jei's tracker now for follow, thanks for looking into it! https://github.com/mezz/JustEnoughItems/issues/3723

Saereth commented 1 week ago

Mezz said this was indeed a jei issue and fixed in the next update so you can close this whenever you like, ty for looking into it!

SuperMartijn642 commented 1 week ago

Thank you, glad to hear it's fixed