From 64a651306413598f71f8a29d41b66809566907c9 Mon Sep 17 00:00:00 2001 From: Victoria Fischer Date: Sat, 21 Jun 2025 11:48:29 +0200 Subject: [PATCH] ore-processing: add some more create integration --- config/almostunified/unify.json | 8 +++++- kubejs/server_scripts/ore-processing.js | 34 +++++++++++++++++++++---- 2 files changed, 36 insertions(+), 6 deletions(-) diff --git a/config/almostunified/unify.json b/config/almostunified/unify.json index 70fc43b..565adf2 100755 --- a/config/almostunified/unify.json +++ b/config/almostunified/unify.json @@ -199,7 +199,13 @@ "forge:bread/ginger": ["create_confectionery:gingerbread", "brewery:gingerbread"], - "forge:bars/chocolate": ["croptopia:chocolate"] + "forge:bars/chocolate": ["croptopia:chocolate"], + + "forge:storage_blocks/redium": ["powder_power:block_redium"], + "forge:storage_blocks/lapium": ["powder_power:block_lapium"], + "forge:storage_blocks/gemium": ["powder_power:block_gemium"], + "forge:storage_blocks/trilium": ["powder_power:block_trilium"], + "forge:storage_blocks/quadrilium": ["powder_power:block_quadrilium"] }, "tagOwnerships": { "forge:crops/bell_pepper": ["forge:crops/bellpepper"], diff --git a/kubejs/server_scripts/ore-processing.js b/kubejs/server_scripts/ore-processing.js index 6eedd17..b83616a 100755 --- a/kubejs/server_scripts/ore-processing.js +++ b/kubejs/server_scripts/ore-processing.js @@ -169,21 +169,40 @@ ServerEvents.recipes(event => { event.remove({output: crushedType}); event.remove({input: crushedType}); - // All dusts and crushed ores can be smelted to ingots, and made with ore hammers + // All dusts and crushed ores can be smelted to ingots, and dusts can be created from crushing ingots if (dustType.id != 'minecraft:air') { event.smelting(ingotType, dustType); event.shapeless(dustType, [ingotType, '#alltheores:ore_hammers']); + event.recipes.create.crushing(dustType, ingotType); + event.recipes.create.milling(dustType, ingotType); } - // Plates can always be smelted back into their original ingot + // Plates can always be smelted back into their original ingot, and crushed back into dust if (plateType.id != 'minecraft:air') { event.smelting(ingotType, plateType); // 1 plate = 1 ingot in presses event.recipes.thermal.press(plateType, [ingotType]); event.recipes.create.pressing([plateType], [ingotType]); + event.recipes.create.crushing(dustType, plateType); + event.recipes.create.milling(dustType, plateType); + event.recipes.thermal.pulverizer(dustType, plateType); } - // 4 ingots = 1 gear + // Gears can also be crushed back into dust + if (gearType.id != 'minecraft:air') { + event.recipes.create.crushing(dustType, gearType); + event.recipes.create.milling(dustType, gearType); + event.recipes.thermal.pulverizer(dustType, gearType); + } + + // Same for rods + if (rodType.id != 'minecraft:air') { + event.recipes.create.crushing(dustType, rodType); + event.recipes.create.milling(dustType, rodType); + event.recipes.thermal.pulverizer(dustType, rodType); + } + + // 4 ingots = 1 gear in the press if (gearType.id != 'minecraft:air') { event.recipes.thermal.press(gearType, [ingotType.withCount(4), 'thermal:press_gear_die']); } @@ -204,7 +223,7 @@ ServerEvents.recipes(event => { event.shapeless(ingotType.withCount(9), [blockType]); } - // All alloys can be created in the smelter, or a superheated mixer + // All alloys can be created in the thermal smelter, or a superheated create mixer if (ingredients.length > 0) { for (const form of ['ingots', 'dusts']) { let real_ingredients = []; @@ -225,10 +244,15 @@ ServerEvents.recipes(event => { real_ingredients.push(real_item); } - if (real_ingredients.length > 0) { + if (real_ingredients.length == 0) { + console.error(`Unable to create ingots from ${form} for ${metal}!`); + } else { + // If we have 3 or fewer ingredients, we can create it in the 3-slot thermal smelter if (real_ingredients.length <= 3) { event.recipes.thermal.smelter(ingotType.withCount(ingredients[0]), real_ingredients); + event.recipes.create.mixing(ingotType.withCount(ingredients[0]), real_ingredients).heated(); } else { + // Materials with 4 or more require superheating, and can only be made in the mixer event.recipes.create.mixing(ingotType.withCount(ingredients[0]), real_ingredients).superheated(); } }