diff --git a/src/installer-rp/pack.ts b/src/installer-rp/pack.ts index 6ab5558..aeb3ebd 100644 --- a/src/installer-rp/pack.ts +++ b/src/installer-rp/pack.ts @@ -64,13 +64,19 @@ export async function buildResourcepackZip(opts: BuildResourcepackOptions): Prom } else { opts.log?.(t('log.packFormatFallback', { format: resolved.format, version: opts.mcVersion })) } - const mcmeta = { - pack: { - description: t('pack.description', { name: opts.packName }), - pack_format: resolved.format, - supported_formats: { min_inclusive: resolved.format, max_inclusive: resolved.format } - } + // pack_format > 64 (즉 1.21.9+) 부터는 supported_formats 가 폐기되고 + // min_format / max_format 가 필수다. 그 이하는 종전대로 supported_formats 사용. + const packMeta: Record = { + description: t('pack.description', { name: opts.packName }), + pack_format: resolved.format } + if (resolved.format > 64) { + packMeta.min_format = resolved.format + packMeta.max_format = resolved.format + } else { + packMeta.supported_formats = { min_inclusive: resolved.format, max_inclusive: resolved.format } + } + const mcmeta = { pack: packMeta } await fs.writeFile(path.join(root, 'pack.mcmeta'), JSON.stringify(mcmeta, null, 2) + '\n') // 2) 음악 파일 복사 + sounds.json 생성/병합