Skip to content

Commit

Permalink
Add BlackNetherBricks
Browse files Browse the repository at this point in the history
  • Loading branch information
Banakin committed Aug 19, 2020
1 parent 4185a1d commit bdac716
Show file tree
Hide file tree
Showing 5 changed files with 90 additions and 1 deletion.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down
1 change: 1 addition & 0 deletions functions/modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'),
Expand Down
82 changes: 82 additions & 0 deletions functions/modules/BlackNetherBricks.js
Original file line number Diff line number Diff line change
@@ -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);
}
6 changes: 6 additions & 0 deletions website/content/_index.md
Original file line number Diff line number Diff line change
Expand Up @@ -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"
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 bdac716

Please sign in to comment.