Tigereye504 / chestcavity

Side effects may include shortness of breath, inhibited healing, inability to fight off infection, vulnerability to physical harm, weakness, loss of nutrition, difficulty walking or running, and sacrifice to Aztec gods .
26 stars 14 forks source link

SalvageRecipe is wrongly implemented #64

Closed Ayutac closed 2 years ago

Ayutac commented 2 years ago

SalvageRecipe does not override Recipe#getIngredients(), leading to misbehaviour in other mods which use that method. In particular, using the autocrafting table in TechReborn (see link below) makes at least the recipes not use up their ingredients, allowing infinite crafting from ingredients of one recipe. Please fix this.

PS: Why does SalvageRecipe exist in the first place? Is there a block besides the crafting table that uses them? Because else these are just normal crafting recipes and the class would be unnecessary. Removing the class and changing the recipes to normal crafting recipes would fix this issue as well.

Tigereye504 commented 2 years ago

Thank you for finding this error, it has been corrected in 2.16.2

Salvage recipes are a separate category because it allows users to put any multiple of the required inputs into a crafting grid, and receive an equally scaled output so long as the number of outputs does not exceed the item's maximum stack size. This prevents numerous duplicate recipes and allows them to expand to take advantage of crafting benches of arbitrary size.