KubeJS (Old)

KubeJS (Old)

3M Downloads

Cannot hide items in REI that are not in a creative tab

ChiefArug opened this issue ยท 0 comments

commented

Minecraft Version

1.19.2

KubeJS Version

dc3de4c

Rhino Version

1902.2.2-build.268

Architectury Version

6.5.82

Forge/Fabric Version

43.2.14

Describe your issue

Caused by the call to IngredientKJS#kjs$getDisplayStacks here

entryWrappers.put(VanillaEntryTypes.ITEM, o -> EntryIngredients.ofItemStacks(o instanceof ItemStack is ? List.of(is) : IngredientJS.of(o).kjs$getDisplayStacks().toList()));

This is because kjs$getDisplayStacks uses ItemStackJS#getList to find the item stacks to search through, which in turn uses the cached item list, which is filled by looping over all of the creative tabs and collecting their contents.

This should probably be fixed by also filling the cached item list from the registry. Swapping the list for a map of item id -> List, fill it from the creative tabs first, then fill it from the registry, only adding that item if it hasn't already been added.

Crash report/logs

No response