TwelveIterationMods / CookingForBlockheads

Minecraft Mod. Adds a cooking book and multiblock kitchens that only shows recipes you can make with what you currently have in your inventory.
https://mods.twelveiterations.com/mc/cooking-for-blockheads/
Other
79 stars 76 forks source link

Improve Ingredient Scanning for better performance #676

Closed BlayTheNinth closed 6 months ago

BlayTheNinth commented 8 months ago

Right now, the kitchen has to search its connected inventories for every recipe shown as well as every single crafting operation. This is a big waste because we already know that items are generally going to be in the same place or at least in the same general area. For example, a storage drawer holding wheat will most likely hold more wheat and thus should be preferred when searching for wheat the next time. A slot in a chest containing an apple will likely hold more apples, and if not, it's still more likely that there are more apples in this chest than in any other connected inventory.

Ideas so far:

Blocked by #673