A single input could be used for more than one thing in a recipe. Consider the following example:
We have a recipe that takes any rock item, and an item from the "sharpened" group.
We have only one sharpened rock and one large rock in our inventory.
The recipe requirements are iterated through:
For the "any rock item" requirement, the first item that matches is "used". In this case, it's the "sharpened rock".
For the "sharpened group" requirement, the only remaining item is the large rock, so it doesn't match.
Since there were no items that matched the sharpened group, it looks back to the items already "used", and tries
to "free" those items. That's this function.
- Freeing an item means returning back to the requirement that used it, and checking if any other items will
fit the requirement.
- If any other items matched that item, this method returns true, and then the item can be used by the
requirement that needed it to be freed.
- In this example, the large rock also fits the "any rock item" requirement, so the sharpened rock is freed
for use by the "sharpened group" requirement.
Returns whether the input could be "freed" (the requirement using it could use sth else instead).
What is this for?
A single input could be used for more than one thing in a recipe. Consider the following example:
to "free" those items. That's this function. - Freeing an item means returning back to the requirement that used it, and checking if any other items will fit the requirement. - If any other items matched that item, this method returns true, and then the item can be used by the requirement that needed it to be freed. - In this example, the large rock also fits the "any rock item" requirement, so the sharpened rock is freed for use by the "sharpened group" requirement.