diff --git a/README.md b/README.md index 6c5fde62..e5af124c 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,7 @@ A guide on making modules is coming soon so stay tuned! ### Avalable Modules - AlternateEnchantGlint +- BetterBedrock - BetterObservers - BorderlessGlass - CherryPicking diff --git a/Storage/packfiles/modules/BetterBedrock/BetterBedrock.png b/Storage/packfiles/modules/BetterBedrock/BetterBedrock.png new file mode 100644 index 00000000..c807490e Binary files /dev/null and b/Storage/packfiles/modules/BetterBedrock/BetterBedrock.png differ diff --git a/functions/modules.js b/functions/modules.js index 6207f30b..c828e1d5 100644 --- a/functions/modules.js +++ b/functions/modules.js @@ -2,6 +2,7 @@ const modulesData = { // Module ID : require('./path/to/module.js'), AlternateEnchantGlint : require('./modules/AlternateEnchantGlint.js'), + BetterBedrock : require('./modules/BetterBedrock.js'), BetterObservers : require('./modules/BetterObservers.js'), BorderlessGlass : require('./modules/BorderlessGlass.js'), CherryPicking : require('./modules/CherryPicking.js'), diff --git a/functions/modules/BetterBedrock.js b/functions/modules/BetterBedrock.js new file mode 100644 index 00000000..2f91b4a1 --- /dev/null +++ b/functions/modules/BetterBedrock.js @@ -0,0 +1,30 @@ +const path = require('path'); + +// Module Data +const moduleData = { + packFilesPath: "modules/BetterBedrock/", + name: "BetterBedrock.png", + inPackName: "bedrock.png", + path54: "assets/minecraft/textures/block", + path321: "assets/minecraft/textures/blocks", +}; + +// Module function +module.exports = async function(format, archive, bucket){ + // Change data based on format + let pathData; + if (format === 1 || format === 2 || format === 3) { + pathData = moduleData.path321; + } else if (format === 4 || format === 5) { + pathData = moduleData.path54; + } else { + console.log('format not addressed'); + return; + } + + // Add file + await bucket.file(path.join("packfiles", moduleData.packFilesPath, moduleData.name)).download().then((data) => { + archive.append(data[0], {name: path.join(pathData, moduleData.inPackName)}); + return; + }); +} \ No newline at end of file diff --git a/website/content/_index.md b/website/content/_index.md index 798e281a..0aec1bfe 100644 --- a/website/content/_index.md +++ b/website/content/_index.md @@ -128,6 +128,11 @@ sections: name: "Unobtrusive Scaffolding" image: "/images/modules/normal/UnobtrusiveScaffolding.png" origin: "vanillatweaks" + + - id: "BetterBedrock" + name: "Better Bedrock" + image: "/images/modules/normal/BetterBedrock.png" + origin: "vanillatweaks" # Glass Modules - id: "glassSection" diff --git a/website/static/images/modules/normal/BetterBedrock.png b/website/static/images/modules/normal/BetterBedrock.png new file mode 100644 index 00000000..c807490e Binary files /dev/null and b/website/static/images/modules/normal/BetterBedrock.png differ