From 6785b7af36b2e104c50aa0ebd0ba4721f423697b Mon Sep 17 00:00:00 2001 From: Dev Date: Fri, 27 Nov 2026 07:26:12 +0100 Subject: [PATCH] Show genuine Melange in spice recipes --- website/scripts/recipe-catalogue.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/website/scripts/recipe-catalogue.mjs b/website/scripts/recipe-catalogue.mjs index 5d74cda2..7f309d76 100644 --- a/website/scripts/recipe-catalogue.mjs +++ b/website/scripts/recipe-catalogue.mjs @@ -21,6 +21,8 @@ function item(command) { export function recipeCatalogue() { const recipes = []; + const spice = entry('spice', 'Melange Spice', 'orange_dye', true); + const requiresSpice = new Set(['dunesponge.yml', 'spice_paste.yml', 'spice_dough.yml', 'weirding_module.yml']); for (const file of readdirSync(source).filter(name => name.endsWith('.yml')).sort()) { const recipe = JSON.parse(readFileSync(new URL(file, source), 'utf8')); const station = recipe.recipeType === 'FURNACE' ? 'Furnace' : 'Crafting table'; @@ -30,7 +32,7 @@ export function recipeCatalogue() { const inputs = Object.entries(recipe) .filter(([key]) => /^input\d+$/.test(key)) .sort(([a], [b]) => Number(a.slice(5)) - Number(b.slice(5))) - .map(([, command]) => item(command)); + .map(([, command]) => command === 'minecraft:orange_dye' && requiresSpice.has(file) ? spice : item(command)); recipes.push({ id: file.slice(0, -4), station, inputs, output: item(recipe.result), amount: recipe.resultAmount ?? 1 }); } for (const recipe of JSON.parse(readFileSync(smoker, 'utf8')).smoker) { @@ -38,7 +40,6 @@ export function recipeCatalogue() { ?? entry(recipe.result, recipe.result.replaceAll('_', ' ').replace(/\b\w/g, letter => letter.toUpperCase()), recipe.result === 'spice_bread' ? 'bread' : 'leather', true); recipes.push({ id: recipe.id + '-smoker', station: 'Smoker', inputs: [item(recipe.inputCommand)], output, amount: recipe.amount }); } - const spice = entry('spice', 'Melange Spice', 'orange_dye', true); const smuggled = entry('smuggled_spice', 'Smuggled Spice', 'orange_dye', true); const crafting = 'Crafting table'; for (const part of JSON.parse(readFileSync(repairParts, 'utf8'))) {