Skip to content

Commit 148fa5b

Browse files
author
ozelot379
committed
Fix parse pack.mcmeta files with 'UFT8-BOOM'
1 parent b32c959 commit 148fa5b

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

‎CHANGELOG.md‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
## [1.6.4]
44
- Fix convert water
55
- Improve particles convert and merge Java 1.13 and 1.14 variants
6+
- Fix parse `pack.mcmeta` files with 'UFT8-BOOM'
67

78
## [1.6.3]
89
- Fix `publish` script

‎src/Converter/MetadataConverter.js‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ class MetadataConverter extends AbstractConverter {
3434
uuid_module = uuid();
3535
}
3636

37-
const mcmeta = JSON.parse((await this.output.read(from)).toString("utf8"));
37+
const mcmeta = JSON.parse((await this.output.read(from)).toString("utf8").trim()); // trim it to supports UF8 files with 'BOOM' at the beginning
3838

3939
if (mcmeta.pack.pack_format !== 4) {
4040
throw new Error("Only supports pack_format 4!");

0 commit comments

Comments
 (0)