fix(IconExporter): ZIP 파일을 icons 폴더 안에 생성하도록 수정
This commit is contained in:
parent
27888c557d
commit
6a3d698d9a
2 changed files with 20 additions and 20 deletions
|
|
@ -65,11 +65,11 @@
|
||||||
│ ├── blocks/
|
│ ├── blocks/
|
||||||
│ │ ├── brass_casing.png
|
│ │ ├── brass_casing.png
|
||||||
│ │ └── ...
|
│ │ └── ...
|
||||||
│ └── items/
|
│ │ └── items/
|
||||||
│ ├── brass_ingot.png
|
│ │ ├── brass_ingot.png
|
||||||
│ └── ...
|
│ │ └── ...
|
||||||
└── icons_create_20251226_181500.zip ← 자동 생성
|
│ └── create_20251226_181500.zip ← 자동 생성
|
||||||
```
|
└── ...
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -87,6 +87,7 @@
|
||||||
## 📁 구조
|
## 📁 구조
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|
||||||
IconExporter/
|
IconExporter/
|
||||||
├── src/main/
|
├── src/main/
|
||||||
│ ├── kotlin/com/beemer/iconexporter/
|
│ ├── kotlin/com/beemer/iconexporter/
|
||||||
|
|
@ -97,7 +98,8 @@ IconExporter/
|
||||||
│ └── resources/
|
│ └── resources/
|
||||||
│ └── META-INF/ # 모드 메타데이터
|
│ └── META-INF/ # 모드 메타데이터
|
||||||
└── build.gradle
|
└── build.gradle
|
||||||
```
|
|
||||||
|
````
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
|
|
@ -113,6 +115,6 @@ IconExporter/
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
./gradlew build
|
./gradlew build
|
||||||
```
|
````
|
||||||
|
|
||||||
빌드된 JAR: `build/libs/iconexporter-1.0.0.jar`
|
빌드된 JAR: `build/libs/iconexporter-1.0.0.jar`
|
||||||
|
|
|
||||||
|
|
@ -265,22 +265,20 @@ object IconExportManager {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** icons 폴더를 ZIP으로 압축 파일명: icons_<modFilter>_<timestamp>.zip */
|
/** icons 폴더를 ZIP으로 압축 파일명: <modFilter>_<timestamp>.zip */
|
||||||
private fun createZipArchive(iconsDir: Path): Path? {
|
private fun createZipArchive(iconsDir: Path): Path? {
|
||||||
if (!iconsDir.exists()) {
|
if (!iconsDir.exists()) {
|
||||||
return null
|
return null
|
||||||
}
|
}
|
||||||
|
|
||||||
val mc = Minecraft.getInstance()
|
|
||||||
val gameDir = mc.gameDirectory.toPath()
|
|
||||||
|
|
||||||
// ZIP 파일명 생성
|
// ZIP 파일명 생성
|
||||||
val timestamp =
|
val timestamp =
|
||||||
java.time.LocalDateTime.now()
|
java.time.LocalDateTime.now()
|
||||||
.format(java.time.format.DateTimeFormatter.ofPattern("yyyyMMdd_HHmmss"))
|
.format(java.time.format.DateTimeFormatter.ofPattern("yyyyMMdd_HHmmss"))
|
||||||
val modName = currentModFilter ?: "all"
|
val modName = currentModFilter ?: "all"
|
||||||
val zipFileName = "icons_${modName}_$timestamp.zip"
|
val zipFileName = "${modName}_$timestamp.zip"
|
||||||
val zipPath = gameDir.resolve(zipFileName)
|
// icons 폴더 안에 ZIP 생성
|
||||||
|
val zipPath = iconsDir.resolve(zipFileName)
|
||||||
|
|
||||||
IconExporter.LOGGER.info("ZIP 압축 생성 중: {}", zipPath)
|
IconExporter.LOGGER.info("ZIP 압축 생성 중: {}", zipPath)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue