create: start integrating create

This commit is contained in:
2025-04-20 15:29:25 +02:00
parent 4f9f896618
commit 44b1468bf5
5 changed files with 180 additions and 22 deletions

View File

@ -26,10 +26,10 @@ ServerEvents.recipes(event => {
return itemType;
}
event.shapeless('thermal:quartz_dust', ['8x minecraft:granite', '#alltheores:ore_hammers']);
event.shapeless('thermal:quartz_dust', ['minecraft:quartz', '#alltheores:ore_hammers']);
event.shapeless('thermal:quartz_dust', ['8x minecraft:granite', '#alltheores:ore_hammers']).id('kubejs:quartz_dust_from_granit_crushing_manual_only');
event.shapeless('thermal:quartz_dust', ['minecraft:quartz', '#alltheores:ore_hammers']).id('kubejs:quartz_dust_crushing_manual_only');
// All metals can be processed in the pulverizer, make plates in the press, and make gears with the die
// All metals can be processed in the pulverizer/crusher, 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...`);
@ -66,6 +66,19 @@ ServerEvents.recipes(event => {
],
experience: 0.5
});
event.custom({
type: "create:crushing",
ingredients: [
{tag: `forge:raw_materials/${metal}`}
],
results: [
{item: dustType.id, chance: 1.05},
{item: dustType.id, chance: 0.25},
{item: 'create:experience_nugget', count: 9, chance: 0.75}
],
experience: 0.5
});
}
if (blockType.id != "minecraft:air") {
@ -80,6 +93,19 @@ ServerEvents.recipes(event => {
],
experience: 0.5
});
event.custom({
type: "create:crushing",
ingredients: [
{tag: `forge:raw_materials/${metal}`}
],
results: [
{item: dustType.id, count: 9, chance: 1.05},
{item: dustType.id, count: 9, chance: 0.25},
{item: 'create:experience_nugget', count: 9 * 9, chance: 0.75}
],
experience: 0.5
});
}
// 1 dust = 1 ingot
@ -93,6 +119,16 @@ ServerEvents.recipes(event => {
],
});
event.custom({
type: "create:crushing",
ingredients: [
ingotType.toJson()
],
results: [
dustType.toJson()
],
});
// 4 ingots = 1 gear
event.custom({
type: "thermal:press",
@ -111,6 +147,13 @@ ServerEvents.recipes(event => {
],
result: [plateType.toJson()]
});
event.custom({
type: "create:pressing",
ingredients: [
ingotType.toJson(),
],
results: [plateType.toJson()]
});
});}
// But only these metals can be processed without a machine
@ -127,16 +170,16 @@ ServerEvents.recipes(event => {
'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']);
event.shapeless(plateID, [global.ingotItem(metal, 2), '#alltheores:ore_hammers']).id(`kubejs:plate_crushing_${metal}_manual_only`);
event.shapeless(dustID, [global.ingotItem(metal), '#alltheores:ore_hammers']).id(`kubejs:ore_crushing_${metal}_manual_only`);
});}
// And only these ores can be hammered
// And only these ores can be hammered or crushed
{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']);
event.shapeless(dustType.withCount(2), [`#forge:raw_materials/${ore}`, '#alltheores:ore_hammers']).id(`kubejs:ore_crushing_${ore}_manual_only`);
event.shapeless(dustType.withCount(2 * 9), [`#forge:storage_blocks/raw_${ore}`, '#alltheores:ore_hammers']).id(`kubejs:ore_block_crushing_${ore}_manual_only`);
});}
// And only copper can be smelted without pulverizing
@ -144,26 +187,56 @@ ServerEvents.recipes(event => {
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)), [
// FIXME: Remove the hammer from the create mixer
event.shapeless(Item.of(metalForm('bronze', 'dusts', 'dust').withCount(4)), [
global.dustItem('tin', 2),
global.dustItem('copper', 2),
'#alltheores:ore_hammers'
]);
event.shapeless(Item.of(metalForm('brass', 'dusts', 'dust').withCount(2)), [
]).id('kubejs:bronze_mixing_manual_only');
event.custom({
type: "create:mixing",
ingredients: [
global.dustItem('tin', 2),
global.dustItem('copper', 2),
],
results: [global.dustItem('tin', 4)]
});
event.shapeless(Item.of(metalForm('brass', 'dusts', 'dust').withCount(4)), [
global.dustItem('copper', 3),
global.dustItem('zinc'),
global.dustItem('zinc', 1),
'#alltheores:ore_hammers'
]);
event.shapeless(Item.of(metalForm('invar', 'dusts', 'dust').withCount(2)), [
]).id(`kubejs:brass_mixing_manual_only`);
event.custom({
type: "create:mixing",
ingredients: [
global.dustItem('copper', 3),
global.dustItem('zinc', 1),
],
results: [global.dustItem('brass', 4)]
});
event.shapeless(Item.of(metalForm('invar', 'dusts', 'dust').withCount(4)), [
global.dustItem('iron', 2),
global.dustItem('nickel', 2),
'#alltheores:ore_hammers'
]);
]).id('kubejs:invar_mixing_manual_only');
event.custom({
type: "create:mixing",
ingredients: [
global.dustItem('iron', 2),
global.dustItem('nickel', 2),
],
results: [global.dustItem('invar', 4)]
});
// 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'
]);
global.ingotItem('nickel', 2),
global.ingotItem('copper', 2),
'#kubejs:grist/build/basic',
'#alltheores:ore_hammers'
]).id('kubejs:constantan_dust_mixing_manual_only');
// Constantan is the only metal you can't work on the bench except for gears
event.shaped('thermal:constantan_gear', [
' A ',
@ -196,7 +269,7 @@ ServerEvents.recipes(event => {
],
experience: 0.5
});
event.shapeless("2x thermal:lapis_dust", ["minecraft:lapis_lazuli", '#alltheores:ore_hammers']);
event.shapeless("2x thermal:lapis_dust", ["minecraft:lapis_lazuli", '#alltheores:ore_hammers']).id('kubejs:lapis_dust_crushing_manual_only');
// Create clay by centrifuging gravel and ash bricks
event.custom({