-
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
90 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.