Skip to content

Commit

Permalink
Rename md5 function to fallback_id
Browse files Browse the repository at this point in the history
  • Loading branch information
Quezler committed May 18, 2022
1 parent c49f480 commit a699746
Show file tree
Hide file tree
Showing 30 changed files with 91 additions and 91 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,16 +208,16 @@ onEvent('recipes', (event) => {
event.remove({
id: `minecraft:${color}_carpet_from_white_carpet`
});
md5(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);

md5(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);

md5(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);
Expand All @@ -233,11 +233,11 @@ onEvent('recipes', (event) => {
event.remove({ id: block });
}

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

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

md5(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 Down
Original file line number Diff line number Diff line change
Expand Up @@ -584,14 +584,14 @@ onEvent('recipes', (event) => {
recipes.forEach((recipe) => {
recipe.id
? event.shapeless(recipe.output, recipe.inputs).id(recipe.id)
: md5(event.shapeless(recipe.output, recipe.inputs), id_prefix);
: fallback_id(event.shapeless(recipe.output, recipe.inputs), id_prefix);
});

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

colors.forEach(function (color) {
Expand All @@ -614,12 +614,12 @@ onEvent('recipes', (event) => {
]).id(`${id_prefix}dye_hopper_botany_pot_${color}`);

if (color != 'white') {
md5(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}`
]), id_prefix);
md5(event.shapeless(Item.of(`6x atum:ceramic_tile_${color}`), [
fallback_id(event.shapeless(Item.of(`6x atum:ceramic_tile_${color}`), [
'atum:ceramic_tile_white',
'atum:ceramic_tile_white',
'atum:ceramic_tile_white',
Expand All @@ -628,20 +628,20 @@ onEvent('recipes', (event) => {
'atum:ceramic_tile_white',
`#forge:dyes/${color}`
]), id_prefix);
md5(event.shapeless(Item.of(`3x atum:ceramic_stairs_${color}`), [
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}`
]), id_prefix);
md5(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) {
md5(event.shapeless(ore, `#forge:ores/${material}`), id_prefix);
fallback_id(event.shapeless(ore, `#forge:ores/${material}`), id_prefix);
}
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ onEvent('recipes', (event) => {
data.recipes.forEach((recipe) => {
Ingredient.of(recipe.inputTag).stacks.forEach((input) => {
if (!input.id.includes('chunk')) {
md5(event.custom({
fallback_id(event.custom({
type: 'astralsorcery:block_transmutation',
input: {
block: input.id
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ onEvent('recipes', (event) => {
};

data.recipes.forEach((recipe) => {
md5(event.custom({
fallback_id(event.custom({
type: 'astralsorcery:infuser',
fluidInput: recipe.fluid,
input: recipe.input,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ onEvent('recipes', (event) => {
]
};
data.recipes.forEach((recipe) => {
md5(event.custom({
fallback_id(event.custom({
type: 'betterendforge:alloying',
ingredients: recipe.ingredients,
result: recipe.result,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,6 @@ onEvent('recipes', (event) => {

recipes.forEach((recipe) => {
recipe.type = 'compote:composting';
md5(event.custom(recipe), id_prefix);
fallback_id(event.custom(recipe), id_prefix);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ onEvent('recipes', (event) => {
];

recipes.forEach((recipe) => {
md5(event.custom(recipe), id_prefix);
fallback_id(event.custom(recipe), id_prefix);
});

const tillsIntoFarmland = [
Expand All @@ -107,7 +107,7 @@ onEvent('recipes', (event) => {
let ingredients = Ingredient.of(soil);
let result = [Item.of(farmland)];

md5(event.custom({
fallback_id(event.custom({
type: 'farmersdelight:cutting',
ingredients: [ingredients],
tool: tool,
Expand Down Expand Up @@ -138,7 +138,7 @@ onEvent('recipes', (event) => {

event.remove({ mod: 'farmersdelight', output: recipe.output });

md5(event.custom({
fallback_id(event.custom({
type: 'farmersdelight:cutting',
ingredients: [ingredients],
tool: tool,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ onEvent('recipes', (event) => {
if (recipe.id) {
re.id(recipe.id);
} else {
md5(re, id_prefix);
fallback_id(re, id_prefix);
}
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ onEvent('recipes', (event) => {
*/

lowAmountInputs.forEach((input) => {
md5(event.custom({
fallback_id(event.custom({
type: 'immersiveengineering:fermenter',
fluid: {
fluid: 'immersiveengineering:ethanol',
Expand All @@ -95,7 +95,7 @@ onEvent('recipes', (event) => {
}), `${id_prefix}low/`);
});
normalAmountInputs.forEach((input) => {
md5(event.custom({
fallback_id(event.custom({
type: 'immersiveengineering:fermenter',
fluid: {
fluid: 'immersiveengineering:ethanol',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ onEvent('recipes', (event) => {

recipes.forEach((input) => {
input.inputs.forEach((seed) => {
md5(event.custom({
fallback_id(event.custom({
type: 'immersiveengineering:squeezer',
fluid: {
fluid: 'immersiveengineering:plantoil',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ onEvent('recipes', (event) => {
if (recipe.id) {
re.id(recipe.id);
} else {
md5(re, id_prefix);
fallback_id(re, id_prefix);
}
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ onEvent('recipes', (event) => {
];

recipes.forEach((recipe) => {
md5(event.custom({
fallback_id(event.custom({
type: 'interactio:item_fluid_transform',
inputs: recipe.inputs,
fluid: recipe.fluid,
Expand All @@ -107,7 +107,7 @@ onEvent('recipes', (event) => {
});

simpleTagRecipes.forEach((recipe) => {
md5(event.custom({
fallback_id(event.custom({
type: 'interactio:item_fluid_transform',
inputs: [{ tag: recipe.input, count: 1, return_chance: 0 }],
fluid: { fluid: 'minecraft:water' },
Expand All @@ -121,7 +121,7 @@ onEvent('recipes', (event) => {
});

simpleItemRecipes.forEach((recipe) => {
md5(event.custom({
fallback_id(event.custom({
type: 'interactio:item_fluid_transform',
inputs: [{ item: recipe.input, count: 1, return_chance: 0 }],
fluid: { fluid: 'minecraft:water' },
Expand All @@ -136,7 +136,7 @@ onEvent('recipes', (event) => {

rustyItems.forEach((rustyItem) => {
let unrustedItem = rustyItem.replace('rusty_', '');
md5(event.custom({
fallback_id(event.custom({
type: 'interactio:item_fluid_transform',
inputs: [{ item: unrustedItem, count: 1, return_chance: 0 }],
fluid: { fluid: 'minecraft:water' },
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,6 @@ onEvent('recipes', (event) => {
});

recipes.forEach((recipe) => {
md5(event.stonecutting(recipe.output, recipe.input), id_prefix);
fallback_id(event.stonecutting(recipe.output, recipe.input), id_prefix);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ onEvent('recipes', (event) => {
]
};
data.recipes.forEach((recipe) => {
md5(event.custom({
fallback_id(event.custom({
type: 'pneumaticcraft:fuel_quality',
fluid: {
type: 'pneumaticcraft:fluid',
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ onEvent('recipes', (event) => {
];

recipes.forEach((recipe) => {
md5(event.custom({
fallback_id(event.custom({
type: 'resourcefulbees:centrifuge',
ingredient: recipe.ingredient,
results: recipe.results,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,6 @@ onEvent('recipes', (event) => {
};
data.recipes.forEach((recipe) => {
//event.recipes.thermal.compression_fuel(recipe.fluid).energy(recipe.energy * multiplier);
md5(event.recipes.thermal.compression_fuel(Fluid.of(recipe.input, 1000)).energy(recipe.energy * multiplier), id_prefix);
fallback_id(event.recipes.thermal.compression_fuel(Fluid.of(recipe.input, 1000)).energy(recipe.energy * multiplier), id_prefix);
});
});
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ onEvent('recipes', (event) => {
treeCategories.trees.forEach((tree) => {
if (tree.sap) {
if (tree.rate.living > 0) {
md5(event.custom({
fallback_id(event.custom({
type: 'thermal:tree_extractor',
trunk: tree.trunk,
leaves: tree.leaf,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ function botania_dye_pestle_mortar(event, recipe, id_prefix) {
output = Item.of(recipe.primary, count),
inputs = [recipe.input, 'botania:pestle_and_mortar'];

md5(event.shapeless(output, inputs), `${id_prefix}${arguments.callee.name}/`);
fallback_id(event.shapeless(output, inputs), `${id_prefix}${arguments.callee.name}/`);
}

function create_dye_milling(event, recipe, id_prefix) {
Expand All @@ -58,7 +58,7 @@ function create_dye_milling(event, recipe, id_prefix) {
],
input = recipe.input;

md5(event.recipes.create.milling(outputs, input), `${id_prefix}${arguments.callee.name}/`);
fallback_id(event.recipes.create.milling(outputs, input), `${id_prefix}${arguments.callee.name}/`);
}

function immersiveengineering_dye_crusher(event, recipe, id_prefix) {
Expand All @@ -75,7 +75,7 @@ function immersiveengineering_dye_crusher(event, recipe, id_prefix) {
],
input = recipe.input;

md5(event.recipes.immersiveengineering.crusher(output, input, extras), `${id_prefix}${arguments.callee.name}/`);
fallback_id(event.recipes.immersiveengineering.crusher(output, input, extras), `${id_prefix}${arguments.callee.name}/`);
}

// function integrateddynamics_dye_squeezing(event, recipe, id_prefix) {
Expand All @@ -102,7 +102,7 @@ function immersiveengineering_dye_crusher(event, recipe, id_prefix) {
// }
// });

// md5(event.custom({
// fallback_id(event.custom({
// type: 'integrateddynamics:mechanical_squeezer',
// item: {
// item: recipe.input
Expand All @@ -129,7 +129,7 @@ function mekanism_dye_enriching(event, recipe, id_prefix) {
output = Item.of(recipe.primary, count),
input = recipe.input;

md5(event.recipes.mekanism.enriching(output, input), `${id_prefix}${arguments.callee.name}/`);
fallback_id(event.recipes.mekanism.enriching(output, input), `${id_prefix}${arguments.callee.name}/`);
}

function mekanism_pigment_extracting(event, recipe, id_prefix) {
Expand All @@ -145,7 +145,7 @@ function mekanism_pigment_extracting(event, recipe, id_prefix) {
let dye_color = recipe.primary.split(':')[1].replace('_dye', '');
let count = baseCount * multiplier;

md5(event.custom({
fallback_id(event.custom({
type: 'mekanism:pigment_extracting',
input: { ingredient: { item: recipe.input } },
output: { pigment: `mekanism:${dye_color}`, amount: 256 * count }
Expand All @@ -167,7 +167,7 @@ function pedestals_dye_crushing(event, recipe, id_prefix) {
output = recipe.primary,
input = recipe.input;

md5(event.custom({
fallback_id(event.custom({
type: 'pedestals:pedestal_crushing',
ingredient: { item: input },
result: { item: output, count: count }
Expand All @@ -193,7 +193,7 @@ function thermal_dye_centrifuge(event, recipe, id_prefix) {
],
input = recipe.input;

md5(event.recipes.thermal.centrifuge(outputs, input), `${id_prefix}${arguments.callee.name}/`);
fallback_id(event.recipes.thermal.centrifuge(outputs, input), `${id_prefix}${arguments.callee.name}/`);
}

function atum_quern_milling(event, recipe, id_prefix) {
Expand All @@ -208,7 +208,7 @@ function atum_quern_milling(event, recipe, id_prefix) {
input = recipe.input,
rotations = 1 * multiplier;

md5(event.custom({
fallback_id(event.custom({
type: 'atum:quern',
ingredient: { item: input },
result: { item: output, count: count },
Expand All @@ -223,7 +223,7 @@ function shapeless_dye_crafting(event, recipe, id_prefix) {
var output = Item.of(recipe.primary),
inputs = [recipe.input];

md5(event.shapeless(output, inputs), `${id_prefix}${arguments.callee.name}/`);
fallback_id(event.shapeless(output, inputs), `${id_prefix}${arguments.callee.name}/`);
}

function occultism_dye_crushing(event, recipe, id_prefix) {
Expand All @@ -241,7 +241,7 @@ function occultism_dye_crushing(event, recipe, id_prefix) {
output = recipe.primary,
input = recipe.input;

md5(event.custom({
fallback_id(event.custom({
type: 'occultism:crushing',
ingredient: { item: input },
result: { item: output, count: count },
Expand Down
Loading

0 comments on commit a699746

Please sign in to comment.