KubeJS
Introduction¶
All recipes of Thorium Reactors are normal data pack recipes (JSON). So KubeJS works without any extra integration: you add recipes with event.custom(...) and remove or replace them with the normal KubeJS filters.
All recipe types have the id thoriumreactors:<type>. Put the scripts in kubejs/server_scripts/ and reload with /reload.
Recipe types¶
| Type | Machine | Input | Output |
|---|---|---|---|
thoriumreactors:thorium_crafting |
Thorium Crafting Table | 5x5 pattern | item |
thoriumreactors:blasting |
Blast Furnace | slot-0 (+ slot-1) |
slot-0 (+ slot-1 with chance) |
thoriumreactors:alloying |
Alloy Smelter | slot-0 (+ slot-1, slot-2), each with count |
slot-0 with count |
thoriumreactors:plate_pressing / thoriumreactors:rod_pressing |
Plate Press / Rod Press | slot-0 with count |
slot-0 with count |
thoriumreactors:concentrating |
Concentrator | slot-0 |
slot-0 |
thoriumreactors:decomposing |
Decomposer | slot-0 + tank-0 |
tank-0 |
thoriumreactors:oxidizing |
Oxidizer | slot-0 + tank-0 |
tank-0 |
thoriumreactors:fluid_enriching |
Fluid Enricher | slot-0 + tank-0 |
tank-0 |
thoriumreactors:centrifuging |
Centrifuge | tank-0 |
tank-0 |
thoriumreactors:crystallizing |
Crystallizer | tank-0 |
slot-0 |
thoriumreactors:evaporating |
Evaporator | tank-0 |
slot-0 |
thoriumreactors:electrolysing |
Electrolyzer | tank-0 |
slot-0 (+ tank-0, chance) |
thoriumreactors:salt_smelting |
Salt Melter | slot-0 to slot-2 |
tank-0 |
- Items are written as
{item: 'mod:id'}or{tag: 'forge:ingots/iron'}(inputs), results as{item: 'mod:id', count: 2}where a count is supported. - Fluids are written as
{FluidName: 'minecraft:water', Amount: 100}(Amount in mB). ticksis the duration,temperature(blast furnace, salt melter) is limited to 2500 andticksof the blast furnace to 2500.operationAfterTicks(1 to 1000) says after how many ticks the fluid part is processed.chanceis the chance in percent (1 to 100, default 100) for the second / optional output.
Thorium Crafting Table¶
The pattern can be up to 5x5, the keys can be items or tags. Use event.custom because the recipe needs the larger pattern.
| kubejs/server_scripts/thorium_crafting.js | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | |
Machine recipes¶
Blast Furnace¶
| blasting.js | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 | |
Alloy Smelter¶
Every input has its own amount (count), the metals are melted one after the other (the time follows their melting point) before ticks runs.
| alloying.js | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 | |
Concentrator¶
| concentrating.js | |
|---|---|
1 2 3 4 5 6 7 8 | |
Fluid machines (Decomposer, Oxidizer, Fluid Enricher)¶
These need an item and a fluid and produce a fluid. Change type to decomposing or fluid_enriching for the other machines.
| oxidizing.js | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 | |
Centrifuge¶
| centrifuging.js | |
|---|---|
1 2 3 4 5 6 7 8 9 | |
Crystallizer and Evaporator¶
A fluid becomes an item. Use type: 'thoriumreactors:evaporating' for the Evaporator.
| crystallizing.js | |
|---|---|
1 2 3 4 5 6 7 8 9 | |
Electrolyzer¶
The item and the second fluid are optional, chance (1 to 100) applies to the item.
| electrolysing.js | |
|---|---|
1 2 3 4 5 6 7 8 9 | |
Salt Melter¶
| salt_smelting.js | |
|---|---|
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | |
Remove and change recipes¶
The normal KubeJS filters work with every Thorium recipe:
| remove.js | |
|---|---|
1 2 3 4 5 6 7 8 9 10 | |
To change a recipe, remove it and add your own version with event.custom. You can also give your own recipe a fixed id:
event.custom({ /* ... */ }).id('kubejs:my_blast_recipe')
Tags and items¶
The mod uses tags for its ingredients (for example forge:ingots/aluminum, forge:raw_materials/thorium). Add your own items to them:
| tags.js | |
|---|---|
1 2 3 | |
Note
Wrong values (like a pattern larger than 5x5 or a negative ticks) are rejected when the recipe loads and the recipe is skipped. The reason is written to logs/latest.log and kubejs/logs/server.log.