Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Name all the recipes #4858

Merged
merged 82 commits into from May 18, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
82 commits
Select commit Hold shift + click to select a range
97890e0
Add `md5` helper function
Quezler May 16, 2022
45de2f0
`md5(base/unification/unify_dyes.js)`
Quezler May 16, 2022
94565d1
`md5(base/unification/unify_growables.js)`
Quezler May 16, 2022
12c9e51
Fix recipe hashes colliding due to near empty json
Quezler May 16, 2022
b5eff36
`md5(kubejs/base/unification/unify_materials.js)`
Quezler May 16, 2022
3aceaa3
`md5(base/unification/unify_sawables.js)`
Quezler May 16, 2022
6d06d90
`md5(base/recipes/shapeless.js)`
Quezler May 16, 2022
450b3ca
Update unify_dyes’s id_prefix
Quezler May 16, 2022
3d4872e
`md5(base/recipetypes/minecraft/stonecutter.js)`
Quezler May 16, 2022
3c05431
`md5(base/recipetypes/interactio/item_in_fluid.js)`
Quezler May 16, 2022
e9378e8
`md5(base/recipetypes/farmersdelight/cutting.js)`
Quezler May 16, 2022
1d9f755
`md5(expert/recipetypes/farmersdelight/cutting.js)`
Quezler May 16, 2022
1e84402
Name pneumaticcraft concrete cooling recipe
Quezler May 16, 2022
a412572
Apply md5 to blood magic alchemy table cutting
Quezler May 16, 2022
49a3fc7
Apply md5 to immersive engineering gem/ingot crushing
Quezler May 16, 2022
52c4aa2
Apple md5 to stoneworks unification
Quezler May 16, 2022
edfebf0
Apply md5 to various dye related recipes
Quezler May 16, 2022
809a815
Add md5 to the tree extractor & fermenters
Quezler May 16, 2022
3f19c1c
Name base IF squeezer & fertilizer recipes
Quezler May 17, 2022
c30d599
Apply md5 to base dissolution chamber recipes
Quezler May 17, 2022
95db281
Track `:kjs_` and `/kjs_` recipes during ci
Quezler May 17, 2022
526fd26
Quezler May 17, 2022
2f3bb76
Apply md5 to base AS transmutation recipes
Quezler May 17, 2022
13e15c9
Name base pneumaticcraft assembly recipes
Quezler May 17, 2022
5ffba3f
Apply md5 for base resourcebees centrifuge recipes
Quezler May 17, 2022
74fdc14
Name expert occultism spirit fire recipes
Quezler May 17, 2022
f0e854b
Apply md5 to expert botania mana infusion recipes
Quezler May 17, 2022
88e3cfa
Name IF metal press hdpe sheet recipe
Quezler May 17, 2022
dd5a177
Apply md5 to base IE crusher recipes that lacked id
Quezler May 17, 2022
51a33f9
Name base nature’s aura offering recipes
Quezler May 17, 2022
b1bd9d3
Apply md5 to base betterend alloying recipe
Quezler May 17, 2022
960a036
Apply md5 to base astralsorcery infuser recipes
Quezler May 17, 2022
2ea858b
Apply md5 to base compote composting recipes
Quezler May 17, 2022
dbb1ae0
Name expert pneumaticcraft cooling concrete recipe
Quezler May 17, 2022
c4f9ef1
Apply md5 to thermal compression fuel recipes
Quezler May 17, 2022
2c711a9
Apply md5 to expert enigmatica alloying recipes
Quezler May 17, 2022
32c9604
Name base architect’s pallete warping recipes
Quezler May 17, 2022
0dd2e23
Name base botania mana bee infusion recipe
Quezler May 17, 2022
3cdc32a
Name base botania elven trade recipes
Quezler May 17, 2022
4c71006
Name base thermal lapidary fuel recipes
Quezler May 17, 2022
10dc10b
Name base thermal magmatic fuel recipe
Quezler May 17, 2022
960e038
Name base thermal insolator catalyst recipes
Quezler May 17, 2022
bae7d09
Name base blood magic altar recipe
Quezler May 17, 2022
9a8814f
Name base mekanism injecting recipe
Quezler May 17, 2022
4ed2b24
Name base mekanism mettalurgic infusing recipe
Quezler May 17, 2022
52f49dd
Rename base tconstruct casting table bee jars
Quezler May 17, 2022
5b6cea8
Name base create emptying milk bottle recipe
Quezler May 17, 2022
bf1ee6f
Name enigmatica base create pressing recipe
Quezler May 17, 2022
20d5374
Name base astralsorcery altar starry bee recipe
Quezler May 17, 2022
1e2de13
Apply md5 to base pneumaticcraft fuel recipes
Quezler May 17, 2022
4e7dc55
Name alfsteel ingot comb alternative recipe
Quezler May 17, 2022
8960abd
Name botania pure daisy dense snow recipe
Quezler May 17, 2022
a54772c
Name base thermal tree extractor boost recipe
Quezler May 17, 2022
b9cdffb
Name base tconstruct melting fuel recipe
Quezler May 17, 2022
4a2b31f
Name blood magic dungeon stone recipe
Quezler May 17, 2022
43e06db
Name expert betterend alloying recipe
Quezler May 17, 2022
5fa2116
Fix unify materials namespace
Quezler May 17, 2022
fcd248c
Suffix bloody bee with jar
Quezler May 17, 2022
0b802b5
Suffix elven bee with jar
Quezler May 17, 2022
007b549
Suffix mana bee with jar
Quezler May 17, 2022
6f8bb0b
End the fertilizer prefix with /
Quezler May 17, 2022
102a142
Fix stoneworks id_prefix not ending with /
Quezler May 17, 2022
798e0b3
no -> ¬
Quezler May 17, 2022
1abe129
Name normal quark root recipe
Quezler May 17, 2022
cb29851
Name normal botania mana infusion recipes
Quezler May 17, 2022
d9122bf
Apply md5 to normal thermal smelter recipes
Quezler May 17, 2022
3939dc8
Name normal blood magic shaped recipe
Quezler May 17, 2022
e987124
Name normal torchmaster shaped recipes
Quezler May 17, 2022
7fa8bd9
Name normal quark shaped recipe
Quezler May 17, 2022
87aade3
Name normal quark shapeless recipes
Quezler May 17, 2022
ce132a8
Name normal naturesaura altar recipe
Quezler May 17, 2022
9f795e1
Name weird normal stonecutter recipe
Quezler May 17, 2022
7a51df9
Name normal astralsorcery block transmutation recipes
Quezler May 17, 2022
a7b780b
Fix astral sorcery transmutation id collissions
Quezler May 17, 2022
e54eaa4
Use the id prefix from the recipe
Quezler May 17, 2022
79e11a1
Name normal mekanism mettalurgic infuser recipe
Quezler May 17, 2022
8104db8
Name normal occultism shapeless recipe
Quezler May 17, 2022
8fb7ad9
Name normal eidolon shapeless recipe
Quezler May 17, 2022
9c8c44a
Use md5_ in the recipe id for easy .includes() ^-^
Quezler May 17, 2022
c49f480
Remove redundant kubejs mention
Quezler May 17, 2022
a699746
Rename md5 function to fallback_id
Quezler May 18, 2022
defce92
Exempt botany pot recipes from fallback_id
Quezler May 18, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
13 changes: 9 additions & 4 deletions .github/actions/ci/kubejs-recipes.js
Expand Up @@ -21,7 +21,8 @@ fsp.readFile('logs/kubejs/server.txt').then(data => {
modified: {},

duplicate: {},
nameless: {},
kjs: {},
md5: {},
};

lines.forEach(line => {
Expand All @@ -45,8 +46,12 @@ fsp.readFile('logs/kubejs/server.txt').then(data => {
groups['duplicate'][id] = recipe;
}

if (group == "added" && id.includes(':kjs_')) {
groups['nameless'][id] = recipe;
if (group == "added" && id.includes('kjs_')) {
groups['kjs'][id] = recipe;
}

if (group == "added" && id.includes('md5_')) {
groups['md5'][id] = recipe;
}

groups[group][id] = recipe;
Expand All @@ -57,5 +62,5 @@ fsp.readFile('logs/kubejs/server.txt').then(data => {
fsp.writeFile(`kubejs/exported/recipes/${group}.json`, JSON.stringify(recipes, null, '\t'));
}

console.log(`::notice::${Object.entries(groups['nameless']).length} KubeJS recipes with a randomized name, and ${Object.entries(groups['duplicate']).length} duplicates.`)
console.log(`::notice::${Object.entries(groups['kjs']).length} KubeJS recipes with kjs_, ${Object.entries(groups['md5']).length} recipes with md5_, and ${Object.entries(groups['duplicate']).length} duplicates.`)
});
@@ -1,4 +1,6 @@
onEvent('recipes', (event) => {
const id_prefix = 'enigmatica:base/recipes/replace_input/';

const recipes = [
{
replaceTarget: { id: 'entangled:block' },
Expand Down Expand Up @@ -206,19 +208,19 @@ onEvent('recipes', (event) => {
event.remove({
id: `minecraft:${color}_carpet_from_white_carpet`
});
event.shaped(Item.of(`minecraft:${color}_carpet`, 3), ['WW'], {
fallback_id(event.shaped(Item.of(`minecraft:${color}_carpet`, 3), ['WW'], {
W: `minecraft:${color}_wool`
});
}), id_prefix);

event.shaped(Item.of(`minecraft:${color}_stained_glass_pane`, 8), ['GGG', 'GDG', 'GGG'], {
fallback_id(event.shaped(Item.of(`minecraft:${color}_stained_glass_pane`, 8), ['GGG', 'GDG', 'GGG'], {
G: 'minecraft:glass_pane',
D: dyeTag
});
}), id_prefix);

event.shaped(Item.of(`minecraft:${color}_stained_glass`, 8), ['GGG', 'GDG', 'GGG'], {
fallback_id(event.shaped(Item.of(`minecraft:${color}_stained_glass`, 8), ['GGG', 'GDG', 'GGG'], {
G: 'minecraft:glass',
D: dyeTag
});
}), id_prefix);

['stained_glass', 'stained_glass_pane', 'terracotta', 'concrete_powder', 'wool', 'carpet'].forEach(
(blockName) => {
Expand All @@ -231,11 +233,11 @@ onEvent('recipes', (event) => {
event.remove({ id: block });
}

event.shaped(Item.of(block, 8), ['SSS', 'SDS', 'SSS'], {
fallback_id(event.shaped(Item.of(block, 8), ['SSS', 'SDS', 'SSS'], {
S: itemTag,
D: dyeTag
});
event.shapeless(Item.of(block, 1), [dyeTag, itemTag]);
}), id_prefix);
fallback_id(event.shapeless(Item.of(block, 1), [dyeTag, itemTag]), id_prefix);
}
);

Expand All @@ -261,7 +263,7 @@ onEvent('recipes', (event) => {
event.shapeless(Item.of(block, 1), [dyeTag, itemTag]).id(`kubejs:${blockName}_${color}`);
});

event.shapeless(Item.of(`minecraft:${color}_concrete_powder`, 8), [
fallback_id(event.shapeless(Item.of(`minecraft:${color}_concrete_powder`, 8), [
dyeTag,
'#forge:sand',
'#forge:sand',
Expand All @@ -271,7 +273,7 @@ onEvent('recipes', (event) => {
'#forge:gravel',
'#forge:gravel',
'#forge:gravel'
]);
]), id_prefix);
});

const alt_material_tag_replacements = [
Expand Down
29 changes: 16 additions & 13 deletions kubejs/server_scripts/enigmatica/kubejs/base/recipes/shapeless.js
@@ -1,5 +1,5 @@
onEvent('recipes', (event) => {
const id_prefix = 'enigmatica:base/';
const id_prefix = 'enigmatica:base/shapeless/';
const recipes = [
{ output: 'botania:enchanted_soil', inputs: ['minecraft:grass_block', 'botania:overgrowth_seed'] },
{ output: 'minecraft:sticky_piston', inputs: ['minecraft:piston', '#forge:slimeballs'] },
Expand Down Expand Up @@ -584,14 +584,14 @@ onEvent('recipes', (event) => {
recipes.forEach((recipe) => {
recipe.id
? event.shapeless(recipe.output, recipe.inputs).id(recipe.id)
: event.shapeless(recipe.output, recipe.inputs);
: fallback_id(event.shapeless(recipe.output, recipe.inputs), id_prefix);
});

powahTiers.forEach((tier) => {
if (tier == 'starter') {
return;
}
event.shapeless(`powah:reactor_${tier}`, `powah:reactor_${tier}`);
fallback_id(event.shapeless(`powah:reactor_${tier}`, `powah:reactor_${tier}`), id_prefix);
});

colors.forEach(function (color) {
Expand All @@ -603,42 +603,45 @@ onEvent('recipes', (event) => {
otherSimplePots.push('botanypots:botany_pot');
otherHopperPots.push('botanypots:hopper_botany_pot');

event.shapeless(`botanypots:${color}_botany_pot`, [Ingredient.of(otherSimplePots), `#forge:dyes/${color}`]);
event.shapeless(`botanypots:${color}_botany_pot`, [
Ingredient.of(otherSimplePots),
`#forge:dyes/${color}`
]).id(`${id_prefix}dye_botany_pot_${color}`);

event.shapeless(`botanypots:hopper_${color}_botany_pot`, [
Ingredient.of(otherHopperPots),
`#forge:dyes/${color}`
]);
]).id(`${id_prefix}dye_hopper_botany_pot_${color}`);

if (color != 'white') {
event.shapeless(Item.of(`2x atum:ceramic_slab_${color}`), [
fallback_id(event.shapeless(Item.of(`2x atum:ceramic_slab_${color}`), [
'atum:ceramic_slab_white',
'atum:ceramic_slab_white',
`#forge:dyes/${color}`
]);
event.shapeless(Item.of(`6x atum:ceramic_tile_${color}`), [
]), id_prefix);
fallback_id(event.shapeless(Item.of(`6x atum:ceramic_tile_${color}`), [
'atum:ceramic_tile_white',
'atum:ceramic_tile_white',
'atum:ceramic_tile_white',
'atum:ceramic_tile_white',
'atum:ceramic_tile_white',
'atum:ceramic_tile_white',
`#forge:dyes/${color}`
]);
event.shapeless(Item.of(`3x atum:ceramic_stairs_${color}`), [
]), id_prefix);
fallback_id(event.shapeless(Item.of(`3x atum:ceramic_stairs_${color}`), [
'atum:ceramic_stairs_white',
'atum:ceramic_stairs_white',
'atum:ceramic_stairs_white',
`#forge:dyes/${color}`
]);
event.shapeless(`atum:ceramic_wall_${color}`, ['atum:ceramic_wall_white', `#forge:dyes/${color}`]);
]), id_prefix);
fallback_id(event.shapeless(`atum:ceramic_wall_${color}`, ['atum:ceramic_wall_white', `#forge:dyes/${color}`]), id_prefix);
}
});

materialsToUnify.forEach((material) => {
var ore = Item.of(`emendatusenigmatica:${material}_ore`);
if (ore.exists) {
event.shapeless(ore, `#forge:ores/${material}`);
fallback_id(event.shapeless(ore, `#forge:ores/${material}`), id_prefix);
}
});
});
@@ -1,32 +1,35 @@
onEvent('recipes', (event) => {
const id_prefix = 'enigmatica:base/architects_palette/warping/';

const recipes = [
{
input: 'minecraft:cactus',
output: 'byg:warped_cactus'
output: 'byg:warped_cactus',
id: `${id_prefix}warped_cactus`
},
{
input: '#forge:coral_blocks',
output: 'byg:warped_coral_block'
output: 'byg:warped_coral_block',
id: `${id_prefix}warped_coral_block`
},
{
input: '#forge:corals',
output: 'byg:warped_coral'
output: 'byg:warped_coral',
id: `${id_prefix}warped_coral`
},
{
input: '#forge:coral_fans',
output: 'byg:warped_coral_fan'
output: 'byg:warped_coral_fan',
id: `${id_prefix}warped_coral_fan`
}
];

recipes.forEach((recipe) => {
const re = event.custom({
event.custom({
type: 'architects_palette:warping',
ingredient: [Ingredient.of(recipe.input)],
result: Item.of(recipe.output),
dimension: 'minecraft:the_nether'
});
if (recipe.id) {
re.id(recipe.id);
}
}).id(recipe.id);
});
});
@@ -1,4 +1,6 @@
onEvent('recipes', (event) => {
const id_prefix = 'enigmatica:base/astralsorcery/altar/';

const recipes = [
{
output: Item.of('resourcefulbees:bee_jar', {Entity: "resourcefulbees:starry_bee"}),
Expand Down Expand Up @@ -32,7 +34,8 @@ onEvent('recipes', (event) => {
'astralsorcery:built_in_effect_trait_focus_circle',
'astralsorcery:altar_default_sparkle',
'astralsorcery:built_in_effect_constellation_lines'
]
],
id: `${id_prefix}starry_bee_jar`
}
];

Expand All @@ -58,9 +61,6 @@ onEvent('recipes', (event) => {
constructed_recipe.recipe_class = recipe.recipe_class;
}

const re = event.custom(constructed_recipe);
if (recipe.id) {
re.id(recipe.id);
}
event.custom(constructed_recipe).id(recipe.id);
});
});
@@ -1,4 +1,6 @@
onEvent('recipes', (event) => {
const id_prefix = 'enigmatica:base/astralsorcery/block_transmutation/';

var data = {
recipes: [
{ inputTag: '#forge:ores/diamond', output: 'emendatusenigmatica:emerald_ore', starlight: 1000 },
Expand All @@ -9,10 +11,11 @@ onEvent('recipes', (event) => {
}
]
};

data.recipes.forEach((recipe) => {
Ingredient.of(recipe.inputTag).stacks.forEach((input) => {
if (!input.id.includes('chunk')) {
event.custom({
fallback_id(event.custom({
type: 'astralsorcery:block_transmutation',
input: {
block: input.id
Expand All @@ -21,7 +24,7 @@ onEvent('recipes', (event) => {
block: recipe.output
},
starlight: recipe.starlight
});
}), id_prefix);
}
});
});
Expand Down
@@ -1,4 +1,6 @@
onEvent('recipes', (event) => {
const id_prefix = 'enigmatica:base/astralsorcery/infuser/';

data = {
recipes: [
{
Expand Down Expand Up @@ -75,7 +77,7 @@ onEvent('recipes', (event) => {
};

data.recipes.forEach((recipe) => {
event.custom({
fallback_id(event.custom({
type: 'astralsorcery:infuser',
fluidInput: recipe.fluid,
input: recipe.input,
Expand All @@ -88,6 +90,6 @@ onEvent('recipes', (event) => {
consumeMultipleFluids: false,
acceptChaliceInput: true,
copyNBTToOutputs: false
});
}), id_prefix);
});
});
@@ -1,4 +1,6 @@
onEvent('recipes', (event) => {
const id_prefix = 'enigmatica:base/betterend/alloying/';

var data = {
recipes: [
{
Expand Down Expand Up @@ -28,12 +30,12 @@ onEvent('recipes', (event) => {
]
};
data.recipes.forEach((recipe) => {
event.custom({
fallback_id(event.custom({
type: 'betterendforge:alloying',
ingredients: recipe.ingredients,
result: recipe.result,
experience: recipe.experience,
smelttime: recipe.smelttime
});
}), id_prefix);
});
});
@@ -1,4 +1,6 @@
onEvent('recipes', (event) => {
const id_prefix = 'enigmatica:base/bloodmagic/altar/';

data = {
recipes: [
/*{
Expand All @@ -8,7 +10,7 @@ onEvent('recipes', (event) => {
altarLevel: 0, //Altar Level is zero idexed
consumptionRate: 5, //How much LP is infused per operation
drainRate: 5, //How much LP is lost per operation when the altar is empty
id: 'input item here'
id: 'output item here'
}*/

{
Expand All @@ -17,21 +19,20 @@ onEvent('recipes', (event) => {
syphon: 50000,
altarLevel: 3,
consumptionRate: 50,
drainRate: 50
drainRate: 50,
id: `${id_prefix}bloody_bee_jar`
}

]
};

data.recipes.forEach((recipe) => {
const re = event.recipes.bloodmagic
event.recipes.bloodmagic
.altar(recipe.output, recipe.input)
.upgradeLevel(recipe.altarLevel)
.altarSyphon(recipe.syphon)
.consumptionRate(recipe.consumptionRate)
.drainRate(recipe.drainRate);
if (recipe.id) {
re.id(recipe.id);
}
.drainRate(recipe.drainRate)
.id(recipe.id);
});
});