Update index.js and README.md
This commit is contained in:
parent
60708b0a9c
commit
4a81e95b46
|
@ -1,9 +1,10 @@
|
|||
# Pack Converter
|
||||
## Progress:
|
||||
### Currently working:
|
||||
- Extract *some* 1.8 resource packs and rename blocks and items to their correct 1.20 names.
|
||||
- Change format in pack.mcmeta
|
||||
- Extract 1.8 resource packs and rename blocks and items to their correct 1.20 names.
|
||||
- Pack format change from 1 to 15 in pack.mcmeta
|
||||
### Need to work on:
|
||||
- Rezip pack when done.
|
||||
- Fixing textures
|
||||
- Clock
|
||||
- Compass
|
||||
|
|
26
index.js
26
index.js
|
@ -58,7 +58,7 @@ function convert(input) {
|
|||
const path1 = `${extractedPath}${type}/`;
|
||||
if (rename) {
|
||||
try {
|
||||
// fs.renameSync(`${path1}${name}.${extension}`, `${path1}${rename}.${extension}`);
|
||||
fs.renameSync(`${path1}${name}.${extension}`, `${path1}${rename}.${extension}`);
|
||||
console.log(`Renamed ${name}.${extension} to ${rename}.${extension}`);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
|
@ -67,26 +67,26 @@ function convert(input) {
|
|||
});
|
||||
}).then(() => {
|
||||
try {
|
||||
// fs.renameSync(`${extractedPath}blocks`, `${extractedPath}block`);
|
||||
fs.renameSync(`${extractedPath}blocks`, `${extractedPath}block`);
|
||||
console.log(`Renamed ${extractedPath}blocks to ${extractedPath}block`);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
try {
|
||||
// fs.renameSync(`${extractedPath}items`, `${extractedPath}item`);
|
||||
fs.renameSync(`${extractedPath}items`, `${extractedPath}item`);
|
||||
console.log(`Renamed ${extractedPath}items to ${extractedPath}item`);
|
||||
} catch (error) {
|
||||
console.log(error);
|
||||
}
|
||||
// jsonfile.readFile(`out/${input}/pack.mcmeta`, function (err, obj) {
|
||||
// if (err) console.error(err);
|
||||
// const oldFormat = obj.pack.pack_format;
|
||||
// const newFormat = 15;
|
||||
// obj.pack.pack_format = newFormat;
|
||||
// jsonfile.writeFile(`out/${input}/pack.mcmeta`, obj, { spaces: 2 }, function (err) {
|
||||
// if (err) console.error(err);
|
||||
// console.log(`Pack format changed from ${oldFormat} to ${newFormat}`);
|
||||
// });
|
||||
// });
|
||||
jsonfile.readFile(`out/${input}/pack.mcmeta`, function (err, obj) {
|
||||
if (err) console.error(err);
|
||||
const oldFormat = obj.pack.pack_format;
|
||||
const newFormat = 15;
|
||||
obj.pack.pack_format = newFormat;
|
||||
jsonfile.writeFile(`out/${input}/pack.mcmeta`, obj, { spaces: 2 }, function (err) {
|
||||
if (err) console.error(err);
|
||||
console.log(`Pack format changed from ${oldFormat} to ${newFormat}`);
|
||||
});
|
||||
});
|
||||
});
|
||||
}
|
||||
|
|
Reference in New Issue
Block a user