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 00000000..3b677e13 Binary files /dev/null and b/website/static/images/modules/normal/BlackNetherBricks.png differ