Integrated Dynamics - On the Dynamics of Integration

Receptverwerking

Recipes are a big part of Minecraft. That is why this mod offers first-class support for them via Recipe values, and Ingredients values to represent their input and output collections. In this tutorial, we will have a look at how recipes can be obtained and used.

The easiest way to obtain Recipes is simply by reading it from a machine that can handle recipes. So let's start by reading all crafting recipes by placing a Machine Reader against a Crafting Table and reading the list of recipes.

If you want some more fine-grained control over recipes, or if you are working with a machine that does not expose its recipes via the Machine Reader, you can visually create a Recipe yourself in the Logic Programmer. Let's try creating a simple recipe, for example for crafting a Chest.

In this last part of the tutorial, we'll take recipe reading one step further. Using the Recipe By Output aspect, we can retrieve an operator that, when applied to an Ingredients instance, will return the first Recipe that returns the given Ingredients as output. We will use this to look up the recipe of a Chest.

Let's start by creating an Ingredients instance with a single Chest in your Logic Programmer. Next, read the Recipe By Output aspect from a Machine Reader that targets a Crafting Table. After that, use the Apply operator to apply your Chest Ingredient to the operator you got from the Machine Reader. Finally, insert the resulting variable into a Display Panel to see the Chest's recipe. (Don't forget to insert all your used variables into a Variable Store).

Obviously, there is much more you can do with Recipes and Ingredients. Have a look in the Machine Reader and Logic Programmer to find out what other advanced functionality is available to you.

Aspect
ReceptenRecepten die verwerkt kunnen worden door het doelwit

Uitvoer: Lijst

    Aspect
    Recept per uitvoerEen operator die een recept teruggeeft voor een gegeven uitvoer.

    Uitvoer: Operator

      Operator
      ApplyapplyApply for a given operator a given value.
      • Operator
      • Willekeurig
      • Willekeurig
      Global name: operatorApply(OperatorWillekeurig) → WillekeurigMethod name: Operator.apply(Willekeurig) → Willekeurig
      Advancements
      • ReceptdetectieLees de lijst van recepten van een machine (zoals de werkbank) met behulp van een machinelezer.
      • ReceptbeschrijvingMaak een §8recept§7 met behulp van de visuele logicaprogrammeur.
      • ReceptnaslagZoek het recept van een kist dynamisch op met behulp van een machinelezer.
      Beloningen
      Variabelekaart15
      Machinelezer5
      Weergavepaneel5