ServerEvents.recipes(event => { // Metal tiers: // Copper, iron, tin, nickel, gold, zinc, brass, invar, bronze - Pre-basic build tier, the only ores that don't require a pulverizer or smelter to process // silver, platinum, lead, iridum, osmium - Gated behind the pulverizer // lumium, enderium, electrum, signalum, steel - Alloys are gated behind the smelter as well // uranium - requires basic energetic grist to energize into ingots // Gear tiers: // copper, iron, tin, nickel, zinc, brass, bronze - Pre-gear die tier // invar, bronze, brass - the only alloys you can make without grist // constantan - requires 1 build grist to make the dust alloy // invar, gold, silver, electrum, signalum, lead, steel - Gated behind gear die // lumium, enderium, other alloys - Gated behind heavy duty gear die let metalForm = (metal, tag, form) => { let itemType = AlmostUnified.getPreferredItemForTag(`forge:${tag}/${metal}`); if (itemType.id == 'minecraft:air') { console.log(`metals: ${metal} ${form} has unknown tag forge:${tag}/${metal}?`) let ret = Item.of(`alltheores:${metal}_${form}`); if (ret.id == "minecraft:air") { return Item.of(`thermal:${metal}_${form}`); } return ret; } console.log(`metals: forge:${tag}/${metal} found`); return itemType; } event.shapeless('thermal:quartz_dust', ['8x minecraft:granite', '#alltheores:ore_hammers']); event.shapeless('thermal:quartz_dust', ['minecraft:quartz', '#alltheores:ore_hammers']); // All metals can be processed in the pulverizer, make plates in the press, and make gears with the die { let _ = ['copper', 'rose_gold', 'aluminum', 'constantan', 'iron', 'tin', 'nickel', 'gold', 'zinc', 'brass', 'invar', 'bronze', 'silver', 'platinum', 'lead', 'iridium', 'osmium', 'lumium', 'enderium', 'electrum', 'signalum', 'steel', 'uranium'].forEach(metal => { console.log(`Setting up ${metal} processing...`); let gearType = metalForm(metal, 'gears', 'gear'); let dustType = metalForm(metal, 'dusts', 'dust'); let plateType = metalForm(metal, 'plates', 'plate'); let ingotType = metalForm(metal, 'ingots', 'ingot'); let rawType = metalForm(metal, 'raw_materials', 'ore'); let blockType = metalForm(`raw_${metal}`, 'storage_blocks', 'block'); event.remove({output: gearType}); event.remove({output: plateType}); event.remove({input: `#forge:ores/${metal}`}); event.remove({input: `#forge:raw_materials/${metal}`}); // By default, you can't make any blends in the crafting table. event.remove({output: dustType, type: 'minecraft:crafting'}); event.remove({output: ingotType, input: 'minecraft:fire_charge'}); event.remove({id: `alltheores:${metal}_dust_from_alloy_blending`}); console.log(`crushing ${rawType.toJson()} ${dustType.toJson()}`); if (rawType.id != "minecraft:air") { event.custom({ type: "thermal:pulverizer", ingredients: [ {tag: `forge:raw_materials/${metal}`} ], result: [ {item: dustType.id, chance: 1.05}, {item: dustType.id, chance: 0.25} ], experience: 0.5 }); } if (blockType.id != "minecraft:air") { event.custom({ type: "thermal:pulverizer", ingredients: [ {tag: `forge:storage_blocks/raw_${metal}`} ], result: [ {item: dustType.id, chance: 1.05 * 9}, {item: dustType.id, chance: 0.25 * 9} ], experience: 0.5 }); } // 1 dust = 1 ingot event.custom({ type: "thermal:pulverizer", ingredients: [ ingotType.toJson() ], result: [ dustType.toJson() ], }); // 4 ingots = 1 gear event.custom({ type: "thermal:press", ingredients: [ ingotType.withCount(4).toJson(), { item: "thermal:press_gear_die" } ], result: [gearType.toJson()] }); // 1 ingot = 1 plate event.custom({ type: "thermal:press", ingredients: [ ingotType.toJson(), ], result: [plateType.toJson()] }); });} // But only these metals can be processed without a machine {let _ = ['copper', 'iron', 'tin', 'nickel', 'zinc', 'brass', 'bronze', 'lead', 'aluminum'].forEach(metal => { console.log(`Setting up ${metal} manual processing...`); let gearID = metalForm(metal, 'gears', 'gear'); let plateID = metalForm(metal, 'plates', 'plate'); let dustID = metalForm(metal, 'dusts', 'dust'); event.shaped(gearID, [ ' A ', 'ABA', ' A ' ], { 'A': global.ingotItem(metal), 'B': '#forge:gems' }); event.shapeless(plateID, [global.ingotItem(metal, 2), '#alltheores:ore_hammers']); event.shapeless(dustID, [global.ingotItem(metal), '#alltheores:ore_hammers']); });} // And only these ores can be hammered {let _ = ['copper', 'iron', 'tin', 'nickel', 'zinc', 'lead', 'aluminum', 'gold'].forEach(ore => { console.log(`Setting up ${ore} hammering...`); let dustType = metalForm(ore, 'dusts', 'dust'); event.shapeless(dustType.withCount(2), [`#forge:raw_materials/${ore}`, '#alltheores:ore_hammers']); event.shapeless(dustType.withCount(2 * 9), [`#forge:storage_blocks/raw_${ore}`, '#alltheores:ore_hammers']); });} // And only copper can be smelted without pulverizing event.smelting(global.ingotItem('copper'), metalForm('copper', 'raw_materials', 'ore')); console.log(`Setting up blends...`); // These are the only blends you can make by hand, aka pre-smelter alloys event.shapeless(Item.of(metalForm('bronze', 'dusts', 'dust').withCount(2)), [ global.dustItem('tin', 2), global.dustItem('copper', 2), '#alltheores:ore_hammers' ]); event.shapeless(Item.of(metalForm('brass', 'dusts', 'dust').withCount(2)), [ global.dustItem('copper', 3), global.dustItem('zinc'), '#alltheores:ore_hammers' ]); event.shapeless(Item.of(metalForm('invar', 'dusts', 'dust').withCount(2)), [ global.dustItem('iron', 2), global.dustItem('nickel', 2), '#alltheores:ore_hammers' ]); // Constantan dust consumes your first build grist, and it unlocks the basic grist production line event.shapeless(Item.of(metalForm('constantan', 'dusts', 'dust').withCount(4)),[ global.ingotItem('nickel', 2), global.ingotItem('copper', 2), '#kubejs:grist/build/basic', '#alltheores:ore_hammers' ]); // Constantan is the only metal you can't work on the bench except for gears event.shaped('thermal:constantan_gear', [ ' A ', 'ABA', ' A ' ], { 'A': global.ingotItem('constantan'), 'B': '#forge:gems' }); event.shaped('thermal:diamond_gear', [ ' A ', 'ABA', ' A ' ], { 'A': 'minecraft:diamond', 'B': 'minecraft:crying_obsidian' }); // Lapis can be pulverized and hammered. event.remove({output: 'thermal:lapis_dust', type: 'thermal:pulverizer'}); event.custom({ type: "thermal:pulverizer", ingredients: [ { item: "minecraft:lapis_lazuli" } ], result: [ { item: "thermal:lapis_dust", chance: 1.05 }, { item: "thermal:lapis_dust", chance: 0.25 } ], experience: 0.5 }); event.shapeless("2x thermal:lapis_dust", ["minecraft:lapis_lazuli", '#alltheores:ore_hammers']); // Create clay by centrifuging gravel and ash bricks event.custom({ type: "thermal:centrifuge", ingredients: [ { item: "supplementaries:ash_brick" } ], result: [ { item: "minecraft:clay_ball", chance: 1.05 }, { item: "minecraft:clay_ball", chance: 0.25 } ], experience: 0.5 }); event.custom({ type: "thermal:centrifuge", ingredients: [ { item: "minecraft:gravel" } ], result: [ { item: "minecraft:sand", chance: 2.00 }, { item: "minecraft:clay_ball", chance: 0.75 } ], experience: 0.5 }); })