Closed dlowe-net closed 2 years ago
Can you create a pull request so I can view your changes?
Sorry, I meant found a workaround by looking at the source code, not by modifying it.
It works if there's a non-consumable tool in both the crafting matrix and the crafting inventory, but there shouldn't be a need for one in the inventory.
Aa yes, thanks. I am actually aware of this issue. A fix is pretty annoying since Minecraft recipes do not tell up front which items are consumed and which ones aren’t. It’s on the list for future versions.
Specifically, the issue happens for all recipes that consume something from the crafting matrix, then immediately replace it again after crafting. You can only know the item is not actually consumed by doing the crafting and checking the leftovers for any matches.
Right. There's three possibilities per cell - either something is consumed (maybe not even just one thing - some mod out there could do this), something is transformed (like water buckets), or something is replaced. The first two would interact with the inventory.
I think the code might actually be simpler to detect the crafting changes made than to anticipate what might happen.
The code would be simpler yes, but it’s incompatible with the way it’s set up now. There are 2 reasons:
Without the anticipated cost, I cannot make users aware if the automat supports auto-crafting or not. This is an important feature I want to keep. My personal solution will be to “bake” the material cost of those non-standard recipes, for example by simulating the recipe once when it’s put in the matrix. If you have suggestions please let me know
I'm closing this issue for now. Future versions of CA will switch to another mechanism of checking ingredients which should fix bugs like these
Many Harvestcraft recipes are unusual in that they provide a tool which is not consumed or replaced by the crafting process. I made a workaround, looking at the source code, where one can put a tool in both the crafting matrix and the inventory and it works.