From 6a3d698d9a72f4118190a1db1716080741434e8e Mon Sep 17 00:00:00 2001 From: Caadiq Date: Fri, 26 Dec 2025 18:34:43 +0900 Subject: [PATCH] =?UTF-8?q?fix(IconExporter):=20ZIP=20=ED=8C=8C=EC=9D=BC?= =?UTF-8?q?=EC=9D=84=20icons=20=ED=8F=B4=EB=8D=94=20=EC=95=88=EC=97=90=20?= =?UTF-8?q?=EC=83=9D=EC=84=B1=ED=95=98=EB=8F=84=EB=A1=9D=20=EC=88=98?= =?UTF-8?q?=EC=A0=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- IconExporter/README.md | 30 ++++++++++--------- .../iconexporter/export/IconExportManager.kt | 10 +++---- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/IconExporter/README.md b/IconExporter/README.md index 69465db..b883a3f 100644 --- a/IconExporter/README.md +++ b/IconExporter/README.md @@ -65,11 +65,11 @@ │ ├── blocks/ │ │ ├── brass_casing.png │ │ └── ... -│ └── items/ -│ ├── brass_ingot.png -│ └── ... -└── icons_create_20251226_181500.zip ← 자동 생성 -``` +│ │ └── items/ +│ │ ├── brass_ingot.png +│ │ └── ... +│ └── create_20251226_181500.zip ← 자동 생성 +└── ... --- @@ -87,17 +87,19 @@ ## 📁 구조 ``` + IconExporter/ ├── src/main/ -│ ├── kotlin/com/beemer/iconexporter/ -│ │ ├── command/ # 커맨드 처리 -│ │ ├── export/ # 추출 관리자 -│ │ ├── render/ # FBO 렌더러 -│ │ └── IconExporter.kt # 메인 모드 -│ └── resources/ -│ └── META-INF/ # 모드 메타데이터 +│ ├── kotlin/com/beemer/iconexporter/ +│ │ ├── command/ # 커맨드 처리 +│ │ ├── export/ # 추출 관리자 +│ │ ├── render/ # FBO 렌더러 +│ │ └── IconExporter.kt # 메인 모드 +│ └── resources/ +│ └── META-INF/ # 모드 메타데이터 └── build.gradle -``` + +```` --- @@ -113,6 +115,6 @@ IconExporter/ ```bash ./gradlew build -``` +```` 빌드된 JAR: `build/libs/iconexporter-1.0.0.jar` diff --git a/IconExporter/src/main/kotlin/com/beemer/iconexporter/export/IconExportManager.kt b/IconExporter/src/main/kotlin/com/beemer/iconexporter/export/IconExportManager.kt index ac1c9c1..0c52522 100644 --- a/IconExporter/src/main/kotlin/com/beemer/iconexporter/export/IconExportManager.kt +++ b/IconExporter/src/main/kotlin/com/beemer/iconexporter/export/IconExportManager.kt @@ -265,22 +265,20 @@ object IconExportManager { } } - /** icons 폴더를 ZIP으로 압축 파일명: icons__.zip */ + /** icons 폴더를 ZIP으로 압축 파일명: _.zip */ private fun createZipArchive(iconsDir: Path): Path? { if (!iconsDir.exists()) { return null } - val mc = Minecraft.getInstance() - val gameDir = mc.gameDirectory.toPath() - // ZIP 파일명 생성 val timestamp = java.time.LocalDateTime.now() .format(java.time.format.DateTimeFormatter.ofPattern("yyyyMMdd_HHmmss")) val modName = currentModFilter ?: "all" - val zipFileName = "icons_${modName}_$timestamp.zip" - val zipPath = gameDir.resolve(zipFileName) + val zipFileName = "${modName}_$timestamp.zip" + // icons 폴더 안에 ZIP 생성 + val zipPath = iconsDir.resolve(zipFileName) IconExporter.LOGGER.info("ZIP 압축 생성 중: {}", zipPath)