From bdac7167f59ed335b278229e1e11b3ae5a5915e0 Mon Sep 17 00:00:00 2001 From: Banakin Date: Wed, 19 Aug 2020 14:34:30 -0400 Subject: [PATCH] Add BlackNetherBricks --- README.md | 2 +- functions/modules.js | 1 + functions/modules/BlackNetherBricks.js | 82 ++++++++++++++++++ website/content/_index.md | 6 ++ .../modules/normal/BlackNetherBricks.png | Bin 0 -> 449 bytes 5 files changed, 90 insertions(+), 1 deletion(-) create mode 100644 functions/modules/BlackNetherBricks.js create mode 100644 website/static/images/modules/normal/BlackNetherBricks.png diff --git a/README.md b/README.md index 38f3215d..ac595167 100644 --- a/README.md +++ b/README.md @@ -16,6 +16,7 @@ A guide on making modules is coming soon so stay tuned! For now check out [this ### Aesthetic +- BlackNetherBricks - CherryPicking - UnbundledHayBales - SolidHoney @@ -89,7 +90,6 @@ A guide on making modules is coming soon so stay tuned! For now check out [this ### Coming Soon -- BlackNetherBricks - BrighterNether - DarkUI - MineProgressBar diff --git a/functions/modules.js b/functions/modules.js index cd9e8f62..96a4237f 100644 --- a/functions/modules.js +++ b/functions/modules.js @@ -4,6 +4,7 @@ const modulesData = { AlternateEnchantGlint : require('./modules/AlternateEnchantGlint.js'), BetterBedrock : require('./modules/BetterBedrock.js'), BetterObservers : require('./modules/BetterObservers.js'), + BlackNetherBricks : require('./modules/BlackNetherBricks.js'), BorderlessGlass : require('./modules/BorderlessGlass.js'), CherryPicking : require('./modules/CherryPicking.js'), CleanBorderlessGlass : require('./modules/CleanBorderlessGlass.js'), diff --git a/functions/modules/BlackNetherBricks.js b/functions/modules/BlackNetherBricks.js new file mode 100644 index 00000000..64a1a8f9 --- /dev/null +++ b/functions/modules/BlackNetherBricks.js @@ -0,0 +1,82 @@ +const path = require('path'); + +// Module Data +const moduleData = { + packFilesPath: "modules/BlackNetherBricks", + format65: { + files: [ + { + name: "chiseled_nether_bricks.png", + inPackName: "chiseled_nether_bricks.png", + path: "assets/minecraft/textures/block" + }, + { + name: "cracked_nether_bricks.png", + inPackName: "cracked_nether_bricks.png", + path: "assets/minecraft/textures/block" + }, + { + name: "nether_bricks.png", + inPackName: "nether_bricks.png", + path: "assets/minecraft/textures/block" + }, + { + name: "nether_brick.png", + inPackName: "nether_brick.png", + path: "assets/minecraft/textures/item" + }, + ] + }, + format4: { + files: [ + { + name: "nether_bricks.png", + inPackName: "nether_bricks.png", + path: "assets/minecraft/textures/block" + }, + { + name: "nether_brick.png", + inPackName: "nether_brick.png", + path: "assets/minecraft/textures/item" + }, + ] + }, + format321: { + files: [ + { + name: "nether_bricks.png", + inPackName: "nether_bricks.png", + path: "assets/minecraft/textures/blocks" + }, + { + name: "nether_brick.png", + inPackName: "nether_brick.png", + path: "assets/minecraft/textures/items" + }, + ] + }, +}; + +// Module function +module.exports = async function(format, archive, bucket){ + // Change data based on format + let formatData; + if (format === 1 || format === 2 || format === 3) { + formatData = moduleData.format321 + } else if (format === 4) { + formatData = moduleData.format4 + } else if (format === 5 || format === 6) { + formatData = moduleData.format65 + } else { + console.log('format not addressed'); + return; + } + + // Add ores to file + const promises = formatData.files.map(async (fileData, id) => { + await bucket.file(path.join("packfiles", formatData.packFilesPath, fileData.name)).download().then((data) => { + return archive.append(data[0], {name: path.join(fileData.path, fileData.inPackName)}); + }); + }); + await Promise.all(promises); +} \ No newline at end of file diff --git a/website/content/_index.md b/website/content/_index.md index 957b76b8..757e0fac 100644 --- a/website/content/_index.md +++ b/website/content/_index.md @@ -60,6 +60,12 @@ sections: notcompatable: - 1 - 2 + + - id: "BlackNetherBricks" + name: "Black Nether Bricks" + image: "/images/modules/normal/BlackNetherBricks.png" + description: "Changes the texture of Nether Bricks to make them black." + origin: "vanillatweaks" # Terrain - id: "terrainSection" diff --git a/website/static/images/modules/normal/BlackNetherBricks.png b/website/static/images/modules/normal/BlackNetherBricks.png new file mode 100644 index 0000000000000000000000000000000000000000..3b677e138ae3261a67b771375425aa438ee2ad6e GIT binary patch literal 449 zcmeAS@N?(olHy`uVBq!ia0vp^3LwnF3?v&v(vJfv#^NA%Cx&(BWL^R}Ea{HEjtmSN z`?>!lvI6-A0X`wF0s;bJVq((L((>~1N=ix^8X9_fdO%5BV4i!64N#7=z$3Dlfr0N3 z2s4Umcr^emlk#+N4AD3rI`LvIiz1JUy8QP0mUkT)FEskHZoJHx!|wfGHHF7AHYxMk z8r_G-C7#bvj{iLC@9dv*3cgRQPQNs*-8$xO|Bo534{C+1x_f6!rm+}Ln%2#btt*zK zbv?705i&Js(y9fYKIm90H5cwrK6?CACr9xd+q0IxC75>>E99SVJajv>o zE^ZCJ{I)mU3zsa5>TFoDXldA{2@?z|_DDqZAFyXjn=?1>i_Q6o&v$%swQqW$o53xf zH%Ino0ZZd0LD4Q(5ngelskf%5ISZV)G&xVjQDDj^j;R;aZv2Xw^_h!nmysB6O-|Ev z^#@aVC_y9W|QRiN0+LZ_ob?SRF~@P-79``o{g7o{oV(44e~`o@lHZJ RUU`6m)zj6_Wt~$(697|{p=SU9 literal 0 HcmV?d00001