Crafting Bench

Crafting Bench

8.6k Downloads

[1.19.2] Recipe lookup on interact taking a long time

PapiOphidian opened this issue ยท 1 comments

commented

The modpack I've made does include quite a few mods which adds a lot of recipes and the time taken to build a list of craftable recipes is very considerable. The time wasted is also very noticeable considering the fact that this happens every time you interact with the bench versus what can be crafted being cached.

What I would suggest is to not just take a standard approach and caching when at least one of the inventories the bench searches through changes, but rather on recipes loading (startup, runtime through stuff like kubejs or the likes), building a tree of everything and using an algorithm like alpha-beta pruning to filter the list whenever an inventory the bench searches through does eventually change and cache that result.

If that suggestion isn't viable, then I'd at least let the user know that the bench is looking through the recipes somehow and possibly as the bench finds recipes, populate the list of craftables versus waiting for the entire filter to finish.

commented

+1 to this issue. If the recipe finder takes too long, it just silently dies.