Recipe Basics
Oritech uses a base class for all its recipes. Each recipe type has different requirements and constraints it must follow. KubeJS Oritech adds validation for all recipe types it adds support for ensuring you never accidentally create an invalid recipe. To assist you in development, there are a lot of custom error messages that appear upon /reloading or restarting the game.
Overview
The base layout for each Oritech recipe is the following:
- item inputs
- type:
List<Ingredient> - supports amounts: no
- default: empty list
- description: inputs can be specified by tags, items, or stacks; each entry can only ever have a count of 1
- primary access:
itemInputs(...) - aliases:
ingredients,inputs,itemInput,ingredient,input
- type:
- item outputs
- type:
List<ItemStack> - supports amounts: yes
- default: empty list
- description: outputs can be specified by items or stacks; a single input could produce multiple outputs
- primary access:
itemOutputs(...) - aliases:
results,outputs,itemOutput,itemResult,itemResults,result,output
- type:
- fluid input
- type:
SizedFluidIngredient - supports amounts: yes
- default: empty
- description: inputs can be specified by tags, fluids, or fluid stacks; this input supports amounts
- primary access:
fluidInput(...) - aliases:
fluidIngredient,fluid,fluidInputs,fluidIngredients,fluids
- type:
- fluid outputs
- type:
List<FluidStack> - supports amounts: yes
- default: empty list
- description: outputs can be specified by fluids or fluid stacks; a single input could produce multiple outputs
- primary access:
fluidOutputs(...) - aliases:
fluidResults,fluidOutput,fluidResult
- type:
- time
- type:
Integer - default: 60
- description: Oritech uses this property for various purposes, read more about it in the dedicated section below
- primary access:
time(...) - aliases:
ticks,timeInTicks,duration - helper accessors:
seconds,timeInSeconds- these helpers assign the passed amount multiplied by 20
- type:
All recipe types theoretically support all of these properties. However, because of slot limitations and logic, most recipes have special constraints and make use of the time property in different ways. Some recipe only support items, some only fluids and some accept both types in different ratios.
There is special handling to accept a single parameter when a list is required. This means instead of itemOutputs(['cobblestone']), you can also write itemOutputs('cobblestone'). However, when multiple entries are required, you have to pass them as an array (with the [] brackets).
If you want to know more about the limitations and requirements for specific recipes, read the respective recipe page.
Time
The time property is mostly used for defining how long a machine has to operate to finish a single recipe. However, because Oritech uses the base recipe type for all of its recipes, it is often reused to define different data.
If the time is not specified, it defaults to 60. Time is always measured in game ticks. 20 game ticks are one second in real life. That means 60 ticks would be 3 seconds.
Sometimes, the time property is used to define how much energy is required to finish a certain recipes. You can read more about the specific usages on each recipe page.