From 97983156c6cca951c5450b18e6e9e7b48f1f94c1 Mon Sep 17 00:00:00 2001 From: MayaTheShy Date: Thu, 26 Mar 2026 13:43:50 -0400 Subject: [PATCH] feat: expand upstream CDN mapping for additional modpack support --- web/server/server.js | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/web/server/server.js b/web/server/server.js index f711317..b6973db 100644 --- a/web/server/server.js +++ b/web/server/server.js @@ -178,11 +178,17 @@ const server = createServer(app); const TEXTURE_CACHE_DIR = process.env.TEXTURE_CACHE_DIR || path.join('/data', 'texture-cache'); const NEGATIVE_CACHE_TTL = 7 * 24 * 60 * 60 * 1000; // 7 days for 404s -// Upstream CDN mapping +// Upstream CDN mapping (Prominence Hasturian Era II modpack coverage) const TEXTURE_UPSTREAMS = { minecraft: 'https://cdn.jsdelivr.net/gh/InventivetalentDev/minecraft-assets@1.21.4/assets/minecraft/textures', computercraft: 'https://raw.githubusercontent.com/cc-tweaked/CC-Tweaked/mc-1.20.x/projects/common/src/main/resources/assets/computercraft/textures', create: 'https://raw.githubusercontent.com/Creators-of-Create/Create/mc1.20.1/dev/src/main/resources/assets/create/textures', + mythicmetals: 'https://raw.githubusercontent.com/Noaaan/MythicMetals/1.20/src/main/resources/assets/mythicmetals/textures', + farmersdelight: 'https://raw.githubusercontent.com/vectorwing/FarmersDelight/1.20/src/main/resources/assets/farmersdelight/textures', + ad_astra: 'https://raw.githubusercontent.com/terrarium-earth/Ad-Astra/1.20.1/common/src/main/resources/assets/ad_astra/textures', + betterend: 'https://raw.githubusercontent.com/quiqueck/BetterEnd/1.20/src/main/resources/assets/betterend/textures', + ae2: 'https://raw.githubusercontent.com/AppliedEnergistics/Applied-Energistics-2/fabric/1.20.1/src/main/resources/assets/ae2/textures', + twilightforest: 'https://raw.githubusercontent.com/TeamTwilight/twilightforest/1.20.1/src/main/resources/assets/twilightforest/textures', }; // Ensure cache directory exists @@ -428,7 +434,7 @@ app.get('/api/texture/resolve/:namespace/:itemName', (req, res) => { app.get('/api/texture/:namespace/*', async (req, res) => { const { namespace } = req.params; const texturePath = req.params[0]; - const upstream = UPSTREAM_URLS[namespace]; + const upstream = TEXTURE_UPSTREAMS[namespace]; if (!upstream) { return res.status(404).send('Unknown namespace'); }