Hi all, I have a question.
Let's say I want to have some crafting recipes that either give a different result are simply unavailable depending on a variable. (The question is not how to store/read this variable, but how to hijack the vanilla crafting process.)
Two simple completely arbitrary examples:
1. Standard crafting recipe is 4 sand becomes 1 sandstone. Now I want to check some data stored on the player and if variable A = 3, putting 4 sand into the craf
You'll need to read this variable from the crafting player (ForgeHooks.getCraftingPlayer) in the appropriate methods to determine the return value. You can either hardcode the variable, value and result or allow them to be specified via the JSON recipe file (possibly via the existing recipe conditions system, like I do in the class Draco18s linked).
For a dynamic input item, you'll need to create your own Ingredient implementation and override Ingredient#apply to check the variable a