From 9f08785fba7cebb3c62804cbd382abdb7fd2c41a Mon Sep 17 00:00:00 2001 From: StealthyX Date: Tue, 3 Sep 2024 10:50:40 -0400 Subject: [PATCH 1/5] Version number incremented I have added a version number increment. --- plugins/resource_pack_utilities/resource_pack_utilities.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/resource_pack_utilities/resource_pack_utilities.js b/plugins/resource_pack_utilities/resource_pack_utilities.js index 19aed0bc..e1c7e786 100644 --- a/plugins/resource_pack_utilities/resource_pack_utilities.js +++ b/plugins/resource_pack_utilities/resource_pack_utilities.js @@ -29,7 +29,7 @@ author: "Ewan Howell", description, tags: ["Minecraft: Java Edition", "Resource Packs", "Utilities"], - version: "1.5.0", + version: "1.6.0", min_version: "4.10.0", variant: "desktop", website: `https://ewanhowell.com/plugins/${id.replace(/_/g, "-")}/`, @@ -4972,4 +4972,4 @@ globalThis.resourcePackUtilities = utilities setupPlugin() -})() \ No newline at end of file +})() From d59256197f5d3307aedd8e9021d830cd3d53fbf7 Mon Sep 17 00:00:00 2001 From: StealthyX Date: Tue, 3 Sep 2024 11:19:57 -0400 Subject: [PATCH 2/5] Update changelog.json Added changelog item. --- plugins/resource_pack_utilities/changelog.json | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/plugins/resource_pack_utilities/changelog.json b/plugins/resource_pack_utilities/changelog.json index 2eeae7b4..612a9076 100644 --- a/plugins/resource_pack_utilities/changelog.json +++ b/plugins/resource_pack_utilities/changelog.json @@ -117,5 +117,18 @@ ] } ] + }, + "1.6.0": { + "title": "1.6.0", + "date": "2024-09-03", + "author": "Ewan Howell", + "categories": [ + { + "title": "Bug Fixes", + "list": [ + "Fixed an issue with the Batch Exporter failing to read BBModels in Bedrock format." + ] + } + ] } -} \ No newline at end of file +} From aadcd11b0aa1411d1b5410cf88cdb2d96bbfcb6e Mon Sep 17 00:00:00 2001 From: StealthyX Date: Tue, 3 Sep 2024 11:23:57 -0400 Subject: [PATCH 3/5] Improved the bulk exporter to handle BBModels more robustly Improved the bulk exporter to handle BBModels more robustly, by adding a fall back to handle when the parser fails to load a bbmodel file that's in bedrock format. --- .../resource_pack_utilities.js | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/plugins/resource_pack_utilities/resource_pack_utilities.js b/plugins/resource_pack_utilities/resource_pack_utilities.js index e1c7e786..9219389b 100644 --- a/plugins/resource_pack_utilities/resource_pack_utilities.js +++ b/plugins/resource_pack_utilities/resource_pack_utilities.js @@ -3323,11 +3323,20 @@ } let data try { - data = JSON.parse(await fs.promises.readFile(path.join(this.inputFolder, file))) + data = JSON.parse(await fs.promises.readFile(path.join(this.inputFolder, file))); } catch { - output.error(`Skipping \`${file}\` as it could not be read`) - this.done++ - continue + try { + data = autoParseJSON( + await fs.promises.readFile( + path.join(this.inputFolder, file), + "utf-8" + ) + ); + } catch { + output.error(`Skipping \`${file}\` as it could not be read`); + this.done++; + continue; + } } if (data.meta.model_format !== this.format && !batchExporterSpecialFormats.includes(this.format)) { output.warn(`Skipping \`${file}\` as it is in ${data.meta.model_format in Formats ? `the \`${Formats[data.meta.model_format].name}\`` : "an unknown"} format`) From e99175472651c00f173377f4154593aa66fe4639 Mon Sep 17 00:00:00 2001 From: StealthyX Date: Tue, 3 Sep 2024 11:26:58 -0400 Subject: [PATCH 4/5] Fixed some extra colons that were left over. Fixed some extra colons that were left over. --- .../resource_pack_utilities/resource_pack_utilities.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/resource_pack_utilities/resource_pack_utilities.js b/plugins/resource_pack_utilities/resource_pack_utilities.js index 9219389b..7882e6e5 100644 --- a/plugins/resource_pack_utilities/resource_pack_utilities.js +++ b/plugins/resource_pack_utilities/resource_pack_utilities.js @@ -3323,7 +3323,7 @@ } let data try { - data = JSON.parse(await fs.promises.readFile(path.join(this.inputFolder, file))); + data = JSON.parse(await fs.promises.readFile(path.join(this.inputFolder, file))) } catch { try { data = autoParseJSON( @@ -3333,9 +3333,9 @@ ) ); } catch { - output.error(`Skipping \`${file}\` as it could not be read`); - this.done++; - continue; + output.error(`Skipping \`${file}\` as it could not be read`) + this.done++ + continue } } if (data.meta.model_format !== this.format && !batchExporterSpecialFormats.includes(this.format)) { From 8c2c529d7810fa81798734435657b0c51edbcb47 Mon Sep 17 00:00:00 2001 From: StealthyX Date: Tue, 3 Sep 2024 11:30:26 -0400 Subject: [PATCH 5/5] Update plugins.json Incremented the version of the resource pack utilities plugin. --- plugins.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins.json b/plugins.json index 8973efb8..6085a9e8 100644 --- a/plugins.json +++ b/plugins.json @@ -365,7 +365,7 @@ "author": "Ewan Howell", "description": "A collection of utilities to assist with resource pack creation.", "tags": ["Minecraft: Java Edition", "Resource Packs", "Utilities"], - "version": "1.5.0", + "version": "1.6.0", "min_version": "4.10.0", "variant": "desktop", "website": "https://ewanhowell.com/plugins/resource-pack-utilities/",