Skip to content

Commit f45c7e0

Browse files
committed
Add Tiny version option to CLI and API; update version to 1.1.1
1 parent 5d87df9 commit f45c7e0

3 files changed

Lines changed: 10 additions & 4 deletions

File tree

README.md

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,12 +36,14 @@ java -jar build/libs/mojang2tiny-1.1.0.jar \
3636
-i <intermediary.tiny> \
3737
-m <mappings.txt> \
3838
-o <output-directory>
39+
-t v2
3940
```
4041

4142
#### Arguments
4243
- `-i`, `--intermediary` — Path to the intermediary mapping file (Tiny format)
4344
- `-m`, `--mappings` — Mojang mapping file to convert
4445
- `-o`, `--output-dir` — Output directory for the generated Tiny file
46+
- `-t`, `--tiny-version` — Tiny version to use (default: `v2`, options: `v1`, `v2`)
4547

4648
### Example (CLI)
4749

@@ -50,6 +52,7 @@ java -jar build/libs/mojang2tiny-1.1.0.jar \
5052
-i intermediary.tiny \
5153
-m mojang-mappings.txt \
5254
-o output/
55+
-t v2
5356
```
5457

5558
### Use as a Java Library (API)
@@ -66,7 +69,9 @@ public class Example {
6669
File intermediary = new File("intermediary.tiny");
6770
File mappings = new File("mojang-mappings.txt");
6871
File outputDir = new File("output");
69-
Main.convert(intermediary, mappings, outputDir);
72+
String tinyVersion = "v2"; // or "v1"
73+
74+
Main.convert(intermediary, mappings, outputDir, tinyVersion);
7075
}
7176
}
7277
```

build.gradle

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ plugins {
44
}
55

66
group = 'com.threadmc'
7-
version = '1.1.0'
7+
version = '1.1.1'
88

99
repositories {
1010
mavenCentral()

src/main/java/com/threadmc/mojang2tiny/Main.java

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,8 +63,9 @@ public static void main(String[] args) {
6363
/**
6464
* Programmatic API for converting mappings. Use this method to invoke the conversion from Java code.
6565
* @param intermediaryFile Intermediary mapping file
66-
* @param mappingFiles List of Mojang mapping files
67-
* @param outputDir Output directory for Tiny mappings
66+
* @param mappingFile Mojang mapping file
67+
* @param outputDir Output directory for Tiny mapping file
68+
* @param tinyVersion Tiny format version (v1 or v2)
6869
* @throws Exception if an error occurs during conversion
6970
*/
7071
public static void convert(File intermediaryFile, File mappingFile, File outputDir, String tinyVersion) throws Exception {

0 commit comments

Comments
 (0)