From 671831535bd56b282f4f36a6dad910509b37017f Mon Sep 17 00:00:00 2001 From: claude-bot Date: Thu, 14 May 2026 21:23:45 +0900 Subject: [PATCH] fix(resourcepack): emit min_format/max_format when pack_format > 64 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit MC 1.21.9+ (pack_format >= 65) deprecated supported_formats and now requires min_format/max_format at pack root. On 26.1.x (format 84) the old supported_formats made pack.mcmeta unparseable, so MC rejected the music-quiz resourcepack with "리소스 새로고침 실패" on reload. --- src/installer-rp/pack.ts | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-) 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 생성/병합