File tree Expand file tree Collapse file tree
wikis/kubejs-oritech/docs/event/particle Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -55,6 +55,29 @@ that happens when no valid recipe is found.
5555 - description: spawns a nether portal at the given position; this is usually used by a special interaction when two Fire Charges
5656 collide with high speed
5757
58+ ## Oritech Recipe
59+
60+ The instance you obtain when using the ` recipe ` property is an ` OritechRecipe ` . This type is reused for all Oritech recipes, so it is not
61+ as straightforward to use. The following shows available properties you can call on the recipe instance to get its data.
62+
63+ All properties and functions, that are not listed here, should not be used and are intended for internal use.
64+
65+ ``` js
66+ // obtains the time of the recipe in ticks
67+ let time = recipe .time
68+
69+ // obtains the input ingredients of the recipe as list
70+ let ingredients = recipe .inputs
71+ let firstInput = ingredients[0 ] // get the first input ingredient
72+
73+ // obtains the output item stacks of the recipe as list
74+ let results = recipe .results
75+ let firstResult = results[0 ] // get the first output item stack
76+ ```
77+
78+ Because this type is reused for all Oritech recipes, the inputs and outputs use lists, even if this specific recipe only has two inputs
79+ and a single output. Make sure to unwrap the list to invoke logic on specific elements.
80+
5881## Event Listener
5982
6083To access the event, the first thing you need to do is to open an event listener for the ` particleCollided ` event in a server script.
You can’t perform that action at this time.
0 commit comments