Skip to content

Commit

Permalink
Add BetterBedrock
Browse files Browse the repository at this point in the history
  • Loading branch information
Banakin committed Aug 1, 2020
1 parent 3641b51 commit 4591749
Show file tree
Hide file tree
Showing 6 changed files with 37 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ A guide on making modules is coming soon so stay tuned!

### Avalable Modules
- AlternateEnchantGlint
- BetterBedrock
- BetterObservers
- BorderlessGlass
- CherryPicking
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions functions/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
30 changes: 30 additions & 0 deletions functions/modules/BetterBedrock.js
Original file line number Diff line number Diff line change
@@ -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;
});
}
5 changes: 5 additions & 0 deletions website/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4591749

Please sign in to comment.