Skip to main content

Module recipe_manager

Module recipe_manager 

Source
Expand description

Recipe matching and crafting grid management.

This module provides functions to match crafting grid contents against registered recipes and update the result slot accordingly.

Functionsยง

find_recipe
Finds a matching recipe for the given crafting container.
get_remaining_items
Gets the remaining items (crafting remainders) for a recipe.
slot_changed_crafting_grid
Called when a slot changes in the crafting grid. Updates the result container with the matching recipe result.