fix(IconExporter): ZIP 파일을 icons 폴더 안에 생성하도록 수정

This commit is contained in:
Caadiq 2025-12-26 18:34:43 +09:00
parent 27888c557d
commit 6a3d698d9a
2 changed files with 20 additions and 20 deletions

View file

@ -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`

View file

@ -265,22 +265,20 @@ object IconExportManager {
}
}
/** icons 폴더를 ZIP으로 압축 파일명: icons_<modFilter>_<timestamp>.zip */
/** icons 폴더를 ZIP으로 압축 파일명: <modFilter>_<timestamp>.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)