Skip to content

Commit 6b6c38f

Browse files
committed
🩹 Fix minor typo in mcmeta error
1 parent 0dc5de9 commit 6b6c38f

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

src/systems/global.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -132,8 +132,9 @@ export class PackMeta {
132132
read() {
133133
if (!fs.existsSync(this.path)) return
134134

135+
const raw = fs.readFileSync(this.path, 'utf-8')
135136
try {
136-
const content = JSON.parse(fs.readFileSync(this.path, 'utf-8'))
137+
const content = JSON.parse(raw)
137138
if (content.pack) {
138139
this.pack_format = content.pack.pack_format ?? this.pack_format
139140
this.description = content.pack.description ?? this.description
@@ -146,7 +147,7 @@ export class PackMeta {
146147
}
147148
} catch (e) {
148149
throw new IntentionalExportError(
149-
`Failed to read existing Data Pack's pack.mcmeta file: ${e}`
150+
`Failed to read existing pack.mcmeta file at ${this.path}: ${e}\n\nFile content:\n${raw}`
150151
)
151152
}
152153
}

src/systems/resourcepackCompiler/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@ export default async function compileResourcePack(
105105
packMetaPath,
106106
0,
107107
[],
108-
`Animated Java Data Pack for ${targetVersions.join(', ')}`
108+
`Animated Java Resource Pack for ${targetVersions.join(', ')}`
109109
)
110110
packMeta.read()
111111
packMeta.pack_format = getResourcePackFormat(targetVersions[0])

0 commit comments

Comments
 (0)