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/", 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 +} diff --git a/plugins/resource_pack_utilities/resource_pack_utilities.js b/plugins/resource_pack_utilities/resource_pack_utilities.js index 19aed0bc..7882e6e5 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, "-")}/`, @@ -3325,9 +3325,18 @@ try { 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`) @@ -4972,4 +4981,4 @@ globalThis.resourcePackUtilities = utilities setupPlugin() -})() \ No newline at end of file +})()