Skip to content

Grist Cost Generation

kirderf1 edited this page Feb 18, 2022 · 1 revision

Grist Cost Generation is a system for generating grist costs at runtime, which is located in com.mraof.minestuck.item.crafting.alchemy.generator.

It allows grist costs to be generated for items based on other grist costs recursively, but also based on other data, such as crafting recipes. Each grist cost recipe may utilize this overriding gristCostRecipe.addCostProvider() and registering GeneratedCostProviders to each item that it can provide a grist cost for. GeneratedGristCost is a helper class for recipes that generate a single grist cost for some set of item ingredients.