ore-processing: add some more create integration

This commit is contained in:
2025-06-21 11:48:29 +02:00
parent 7ac2c6cca2
commit 64a6513064
2 changed files with 36 additions and 6 deletions

View File

@ -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();
}
}