Skip to content

Commit 4591749

Browse files
committed
Add BetterBedrock
1 parent 3641b51 commit 4591749

File tree

6 files changed

+37
-0
lines changed

6 files changed

+37
-0
lines changed

Diff for: README.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ A guide on making modules is coming soon so stay tuned!
1313

1414
### Avalable Modules
1515
- AlternateEnchantGlint
16+
- BetterBedrock
1617
- BetterObservers
1718
- BorderlessGlass
1819
- CherryPicking
452 Bytes
Loading

Diff for: functions/modules.js

+1
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
const modulesData = {
33
// Module ID : require('./path/to/module.js'),
44
AlternateEnchantGlint : require('./modules/AlternateEnchantGlint.js'),
5+
BetterBedrock : require('./modules/BetterBedrock.js'),
56
BetterObservers : require('./modules/BetterObservers.js'),
67
BorderlessGlass : require('./modules/BorderlessGlass.js'),
78
CherryPicking : require('./modules/CherryPicking.js'),

Diff for: functions/modules/BetterBedrock.js

+30
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
const path = require('path');
2+
3+
// Module Data
4+
const moduleData = {
5+
packFilesPath: "modules/BetterBedrock/",
6+
name: "BetterBedrock.png",
7+
inPackName: "bedrock.png",
8+
path54: "assets/minecraft/textures/block",
9+
path321: "assets/minecraft/textures/blocks",
10+
};
11+
12+
// Module function
13+
module.exports = async function(format, archive, bucket){
14+
// Change data based on format
15+
let pathData;
16+
if (format === 1 || format === 2 || format === 3) {
17+
pathData = moduleData.path321;
18+
} else if (format === 4 || format === 5) {
19+
pathData = moduleData.path54;
20+
} else {
21+
console.log('format not addressed');
22+
return;
23+
}
24+
25+
// Add file
26+
await bucket.file(path.join("packfiles", moduleData.packFilesPath, moduleData.name)).download().then((data) => {
27+
archive.append(data[0], {name: path.join(pathData, moduleData.inPackName)});
28+
return;
29+
});
30+
}

Diff for: website/content/_index.md

+5
Original file line numberDiff line numberDiff line change
@@ -128,6 +128,11 @@ sections:
128128
name: "Unobtrusive Scaffolding"
129129
image: "/images/modules/normal/UnobtrusiveScaffolding.png"
130130
origin: "vanillatweaks"
131+
132+
- id: "BetterBedrock"
133+
name: "Better Bedrock"
134+
image: "/images/modules/normal/BetterBedrock.png"
135+
origin: "vanillatweaks"
131136

132137
# Glass Modules
133138
- id: "glassSection"
452 Bytes
Loading

0 commit comments

Comments
 (0)