diff --git a/.gradle/6.3/executionHistory/executionHistory.bin b/.gradle/6.3/executionHistory/executionHistory.bin index 0b62556..593dd6f 100644 Binary files a/.gradle/6.3/executionHistory/executionHistory.bin and b/.gradle/6.3/executionHistory/executionHistory.bin differ diff --git a/.gradle/6.3/executionHistory/executionHistory.lock b/.gradle/6.3/executionHistory/executionHistory.lock index f3caaf2..869ccba 100644 Binary files a/.gradle/6.3/executionHistory/executionHistory.lock and b/.gradle/6.3/executionHistory/executionHistory.lock differ diff --git a/.gradle/6.3/fileHashes/fileHashes.bin b/.gradle/6.3/fileHashes/fileHashes.bin index 3ae9b5b..2977aea 100644 Binary files a/.gradle/6.3/fileHashes/fileHashes.bin and b/.gradle/6.3/fileHashes/fileHashes.bin differ diff --git a/.gradle/6.3/fileHashes/fileHashes.lock b/.gradle/6.3/fileHashes/fileHashes.lock index 64d94ec..298d425 100644 Binary files a/.gradle/6.3/fileHashes/fileHashes.lock and b/.gradle/6.3/fileHashes/fileHashes.lock differ diff --git a/.gradle/buildOutputCleanup/buildOutputCleanup.lock b/.gradle/buildOutputCleanup/buildOutputCleanup.lock index 0f9e3c4..60608e3 100644 Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ diff --git a/.gradle/buildOutputCleanup/outputFiles.bin b/.gradle/buildOutputCleanup/outputFiles.bin index b1dc84a..2ce3593 100644 Binary files a/.gradle/buildOutputCleanup/outputFiles.bin and b/.gradle/buildOutputCleanup/outputFiles.bin differ diff --git a/.gradle/checksums/checksums.lock b/.gradle/checksums/checksums.lock index 3440218..e2776f3 100644 Binary files a/.gradle/checksums/checksums.lock and b/.gradle/checksums/checksums.lock differ diff --git a/.gradle/checksums/md5-checksums.bin b/.gradle/checksums/md5-checksums.bin index a22c6aa..56c2d37 100644 Binary files a/.gradle/checksums/md5-checksums.bin and b/.gradle/checksums/md5-checksums.bin differ diff --git a/.gradle/checksums/sha1-checksums.bin b/.gradle/checksums/sha1-checksums.bin index d7b44a8..49e45fb 100644 Binary files a/.gradle/checksums/sha1-checksums.bin and b/.gradle/checksums/sha1-checksums.bin differ diff --git a/build.gradle b/build.gradle index 2209145..ef3a867 100644 --- a/build.gradle +++ b/build.gradle @@ -14,6 +14,7 @@ repositories { dependencies { implementation "org.jetbrains.kotlin:kotlin-stdlib" + implementation 'org.junit.jupiter:junit-jupiter:5.4.2' compile "org.jetbrains.kotlin:kotlin-stdlib-jdk8:1.4.10" testCompile group: 'junit', name: 'junit', version: '4.12' } diff --git a/build/classes/kotlin/main/codes/mii/SaveEditor/SaveEditor.class b/build/classes/kotlin/main/codes/mii/SaveEditor/SaveEditor.class index 7186cb4..a6ab694 100644 Binary files a/build/classes/kotlin/main/codes/mii/SaveEditor/SaveEditor.class and b/build/classes/kotlin/main/codes/mii/SaveEditor/SaveEditor.class differ diff --git a/build/distributions/SaveEditor-1.0-SNAPSHOT.tar b/build/distributions/SaveEditor-1.0-SNAPSHOT.tar index 8e8d238..0b5f11f 100644 Binary files a/build/distributions/SaveEditor-1.0-SNAPSHOT.tar and b/build/distributions/SaveEditor-1.0-SNAPSHOT.tar differ diff --git a/build/distributions/SaveEditor-1.0-SNAPSHOT.zip b/build/distributions/SaveEditor-1.0-SNAPSHOT.zip index 4c49435..d25d6fd 100644 Binary files a/build/distributions/SaveEditor-1.0-SNAPSHOT.zip and b/build/distributions/SaveEditor-1.0-SNAPSHOT.zip differ diff --git a/build/kotlin/SaveEditor10SNAPSHOTjar-classes.txt b/build/kotlin/SaveEditor10SNAPSHOTjar-classes.txt index e01bda1..73b65e2 100644 --- a/build/kotlin/SaveEditor10SNAPSHOTjar-classes.txt +++ b/build/kotlin/SaveEditor10SNAPSHOTjar-classes.txt @@ -1 +1 @@ -D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Converter.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\MainKt.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\SaveEditor.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\Data.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\NBT.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\NBT_Byte.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\NBT_Compound.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\NBT_End.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\NBT_Int.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\NBT_Long.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\NBT_String.class \ No newline at end of file +D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Converter.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\MainKt.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\SaveEditor.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\Data.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\NBT.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\NBT_Byte.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\NBT_Compound.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\NBT_End.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\NBT_Int.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\NBT_Long.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\NBT_Short.class;D:\Git\SaveEditor\build\classes\kotlin\main\codes\mii\SaveEditor\Types\NBT_String.class \ No newline at end of file diff --git a/build/kotlin/compileKotlin/build-history.bin b/build/kotlin/compileKotlin/build-history.bin index 14efb98..92b7983 100644 Binary files a/build/kotlin/compileKotlin/build-history.bin and b/build/kotlin/compileKotlin/build-history.bin differ diff --git a/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab b/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab index 2a538ae..17f6367 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab and b/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab differ diff --git a/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream b/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream index 50b4ad2..d206931 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream and b/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream differ diff --git a/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len b/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len index 6808208..e812bdf 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len and b/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.values.at b/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.values.at index aafaf29..45d32a1 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.values.at and b/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.values.at differ diff --git a/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab_i b/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab_i index 000c6b0..ccb15f5 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab_i and b/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab_i differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab index 94540e3..e841e57 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream index 1b8d79c..6060d4f 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len index 9223f71..a11dcdc 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at index 99523ad..6d88692 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i index 72f6d7c..069e6f8 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab index 3c52243..3c1f415 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream index 47df1f7..3fa5962 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len index c7fbb23..45e4dd6 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at index a663e2b..3d64788 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.values.at differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i index 07099d2..6e41dc9 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab index 34f5378..98e8ed7 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream index dfdb0d3..12cd760 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len index 499cd2a..bab82df 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at index 11c37e0..05e596e 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.values.at differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab_i b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab_i index ef98c54..2798a3b 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab_i and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab_i differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab index d2ba8c0..307fe45 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream index 0e4bf08..3f1880c 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len index 6808208..e812bdf 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at index e1c705d..e5b90e8 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at differ diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i index 2617daa..d53c3a9 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab_i differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/counters.tab b/build/kotlin/compileKotlin/caches-jvm/lookups/counters.tab index 17c316a..4c07cdd 100644 --- a/build/kotlin/compileKotlin/caches-jvm/lookups/counters.tab +++ b/build/kotlin/compileKotlin/caches-jvm/lookups/counters.tab @@ -1,2 +1,2 @@ -45 -34 \ No newline at end of file +50 +38 \ No newline at end of file diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab b/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab index 7fc6252..a52cd3a 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab and b/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream b/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream index 0e4bf08..3f1880c 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream and b/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len b/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len index 6808208..e812bdf 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len and b/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.values.at b/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.values.at index 09cf79a..e1e0ed2 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.values.at and b/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.values.at differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab_i b/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab_i index 5d38408..4bf53d7 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab_i and b/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab_i differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab b/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab index a8d972e..ab2a283 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab and b/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream b/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream index a2ef68d..845a3a2 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream and b/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len b/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len index 8aefb3a..c4a5886 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len and b/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.len b/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.len index 60e54ab..48e9f9a 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.len and b/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.len differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.values.at b/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.values.at index a663e2b..3d64788 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.values.at and b/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab.values.at differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i b/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i index e829fa7..574f909 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i and b/build/kotlin/compileKotlin/caches-jvm/lookups/id-to-file.tab_i differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab index 2a9aca2..886934f 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab and b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream index 1075a89..9e95e6c 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream and b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream.len b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream.len index e1685b8..210754d 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream.len and b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.keystream.len differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.len b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.len index b329df0..5f5657b 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.len and b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.len differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values index d1b2b25..70bc833 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values and b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values.at b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values.at index da445cf..1d77b48 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values.at and b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values.at differ diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values.s b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values.s index f53b794..ef6935e 100644 --- a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values.s +++ b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab.values.s @@ -1 +1 @@ -É!Ô$Ò'Á#Ê#õ \ No newline at end of file +È;ï)í)ì)ý"Ú!Ð!ûúæÅËÐââÇÙ \ No newline at end of file diff --git a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i index 9708818..06a56ab 100644 Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i and b/build/kotlin/compileKotlin/caches-jvm/lookups/lookups.tab_i differ diff --git a/build/kotlin/compileKotlin/last-build.bin b/build/kotlin/compileKotlin/last-build.bin index 546c64e..8d60195 100644 Binary files a/build/kotlin/compileKotlin/last-build.bin and b/build/kotlin/compileKotlin/last-build.bin differ diff --git a/build/libs/SaveEditor-1.0-SNAPSHOT.jar b/build/libs/SaveEditor-1.0-SNAPSHOT.jar index 7fc90f1..3b54f12 100644 Binary files a/build/libs/SaveEditor-1.0-SNAPSHOT.jar and b/build/libs/SaveEditor-1.0-SNAPSHOT.jar differ diff --git a/build/scripts/SaveEditor b/build/scripts/SaveEditor index 84e1228..9c39dcc 100644 --- a/build/scripts/SaveEditor +++ b/build/scripts/SaveEditor @@ -80,7 +80,7 @@ case "`uname`" in ;; esac -CLASSPATH=$APP_HOME/lib/SaveEditor-1.0-SNAPSHOT.jar:$APP_HOME/lib/kotlin-stdlib-jdk8-1.4.10.jar:$APP_HOME/lib/kotlin-stdlib-jdk7-1.4.10.jar:$APP_HOME/lib/kotlin-stdlib-1.4.10.jar:$APP_HOME/lib/kotlin-stdlib-common-1.4.10.jar:$APP_HOME/lib/annotations-13.0.jar +CLASSPATH=$APP_HOME/lib/SaveEditor-1.0-SNAPSHOT.jar:$APP_HOME/lib/kotlin-stdlib-jdk8-1.4.10.jar:$APP_HOME/lib/kotlin-stdlib-jdk7-1.4.10.jar:$APP_HOME/lib/kotlin-stdlib-1.4.10.jar:$APP_HOME/lib/junit-jupiter-5.4.2.jar:$APP_HOME/lib/kotlin-stdlib-common-1.4.10.jar:$APP_HOME/lib/annotations-13.0.jar:$APP_HOME/lib/junit-jupiter-params-5.4.2.jar:$APP_HOME/lib/junit-jupiter-engine-5.4.2.jar:$APP_HOME/lib/junit-jupiter-api-5.4.2.jar:$APP_HOME/lib/junit-platform-engine-1.4.2.jar:$APP_HOME/lib/junit-platform-commons-1.4.2.jar:$APP_HOME/lib/apiguardian-api-1.0.0.jar:$APP_HOME/lib/opentest4j-1.1.1.jar # Determine the Java command to use to start the JVM. if [ -n "$JAVA_HOME" ] ; then diff --git a/build/scripts/SaveEditor.bat b/build/scripts/SaveEditor.bat index ff83ceb..92248d8 100644 --- a/build/scripts/SaveEditor.bat +++ b/build/scripts/SaveEditor.bat @@ -82,7 +82,7 @@ set CMD_LINE_ARGS=%* :execute @rem Setup the command line -set CLASSPATH=%APP_HOME%\lib\SaveEditor-1.0-SNAPSHOT.jar;%APP_HOME%\lib\kotlin-stdlib-jdk8-1.4.10.jar;%APP_HOME%\lib\kotlin-stdlib-jdk7-1.4.10.jar;%APP_HOME%\lib\kotlin-stdlib-1.4.10.jar;%APP_HOME%\lib\kotlin-stdlib-common-1.4.10.jar;%APP_HOME%\lib\annotations-13.0.jar +set CLASSPATH=%APP_HOME%\lib\SaveEditor-1.0-SNAPSHOT.jar;%APP_HOME%\lib\kotlin-stdlib-jdk8-1.4.10.jar;%APP_HOME%\lib\kotlin-stdlib-jdk7-1.4.10.jar;%APP_HOME%\lib\kotlin-stdlib-1.4.10.jar;%APP_HOME%\lib\junit-jupiter-5.4.2.jar;%APP_HOME%\lib\kotlin-stdlib-common-1.4.10.jar;%APP_HOME%\lib\annotations-13.0.jar;%APP_HOME%\lib\junit-jupiter-params-5.4.2.jar;%APP_HOME%\lib\junit-jupiter-engine-5.4.2.jar;%APP_HOME%\lib\junit-jupiter-api-5.4.2.jar;%APP_HOME%\lib\junit-platform-engine-1.4.2.jar;%APP_HOME%\lib\junit-platform-commons-1.4.2.jar;%APP_HOME%\lib\apiguardian-api-1.0.0.jar;%APP_HOME%\lib\opentest4j-1.1.1.jar @rem Execute SaveEditor "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %SAVE_EDITOR_OPTS% -classpath "%CLASSPATH%" codes.mii.SaveEditor.MainKt %CMD_LINE_ARGS% diff --git a/src/main/kotlin/codes/mii/SaveEditor/Converter.kt b/src/main/kotlin/codes/mii/SaveEditor/Converter.kt index d793f37..c70c504 100644 --- a/src/main/kotlin/codes/mii/SaveEditor/Converter.kt +++ b/src/main/kotlin/codes/mii/SaveEditor/Converter.kt @@ -1,80 +1,142 @@ package codes.mii.SaveEditor -import codes.mii.SaveEditor.Types.NBT_Byte -import codes.mii.SaveEditor.Types.NBT_Compound -import codes.mii.SaveEditor.Types.NBT_End -import codes.mii.SaveEditor.Types.NBT_String +import codes.mii.SaveEditor.Types.* import java.io.File import java.io.IOException import java.nio.file.Files +import kotlin.experimental.and class Converter { + @ExperimentalUnsignedTypes fun convert(byte: ByteArray): NBT_Compound { val result = NBT_Compound(0, "") val byteSize = byte.size var readingPosition = 0 - while (byteSize > readingPosition) { - println(byte[readingPosition]) + try { + while (byteSize > readingPosition) { + println(byte[readingPosition]) - val nowByte = byte[readingPosition] - var nameLength = 0 - val name = StringBuilder() + val nowByte = byte[readingPosition] + var nameLength = 0 + val name = StringBuilder() - if (nowByte != 0.toByte()) { - var nameLengthText = "" - repeat(2) { - readingPosition++ - nameLengthText += byte[readingPosition].toString(16) - } - nameLength = nameLengthText.toInt(16) - - repeat (nameLength) { - readingPosition++ - name.append(hexToAscii(byte[readingPosition].toString(16))) - } - } - - when(nowByte) { - 0.toByte() -> { - result.data.add(NBT_End()) - readingPosition++ - } - - 1.toByte() -> { - readingPosition++ - result.data.add(NBT_Byte(nameLength.toByte(), name.toString(), byte[readingPosition])) - } - - 8.toByte() -> { - var textLengthText = "" + if (nowByte != 0.toByte()) { + val nameLengthText = StringBuilder() repeat(2) { readingPosition++ - textLengthText += byte[readingPosition].toString(16) + val n = if (it != 1){ + (byte[readingPosition].toUByte()).toString(16) + } else { + (byte[readingPosition]).toString(16) + } + nameLengthText.append(if (n.length == 2) { n } else { "0$n" }) } - val textLength = textLengthText.toInt(16) + nameLength = nameLengthText.toString().toInt(16) - val text = StringBuilder() - repeat (textLength) { + repeat(nameLength) { + readingPosition++ + name.append(hexToAscii(byte[readingPosition].toString(16))) + } + } + + when (nowByte) { + 0.toByte() -> { // END + result.data.add(NBT_End()) readingPosition++ - text.append(hexToAscii(byte[readingPosition].toString(16))) } - result.data.add(NBT_String(nameLength.toByte(), name.toString(), textLength.toByte(), text.toString())) - } + 1.toByte() -> { // BYTE + readingPosition++ + result.data.add(NBT_Byte(nameLength.toByte(), name.toString(), byte[readingPosition])) + } + + 2.toByte() -> { // SHORT + val bytes = StringBuilder() + repeat(2) { + readingPosition++ + val n = if (it != 1){ + (byte[readingPosition].toUByte()).toString(16) + } else { + (byte[readingPosition]).toString(16) + } + bytes.append(if (n.length == 2) { n } else { "0$n" }) + } + + result.data.add(NBT_Short(nameLength.toByte(), name.toString(), bytes.toString().toInt(16))) + } + + 3.toByte() -> { // INT + var intText = StringBuilder() + repeat(4) { + readingPosition++ + val n = if (it != 1){ + (byte[readingPosition].toUByte()).toString(16) + } else { + (byte[readingPosition]).toString(16) + } + intText.append(if (n.length == 2) { n } else { "0$n" }) + } + result.data.add(NBT_Int(nameLength.toByte(), name.toString(), intText.toString().toInt(16))) + } + + 4.toByte() -> { // LONG + val intText = StringBuilder() + repeat(8) { + readingPosition++ + val n = if (it != 1){ + (byte[readingPosition].toUByte()).toString(16) + } else { + (byte[readingPosition]).toString(16) + } + + intText.append(if (n.length == 2) { n } else { "0$n" }) + } + result.data.add(NBT_Long(nameLength.toByte(), name.toString(), intText.toString().toLong(16))) + } + + 8.toByte() -> { // STRING + val textLengthText = StringBuilder() + repeat(2) { + readingPosition++ + val n = if (it != 1){ + (byte[readingPosition].toUByte()).toString(16) + } else { + (byte[readingPosition]).toString(16) + } + textLengthText.append(if (n.length == 2) { n } else { "0$n" }) + } + val textLength = textLengthText.toString().toInt(16) + + val text = StringBuilder() + repeat(textLength) { + readingPosition++ + text.append(hexToAscii(byte[readingPosition].toString(16))) + } + + result.data.add(NBT_String(nameLength.toByte(), name.toString(), textLength.toByte(), text.toString())) + } + + 10.toByte() -> { // COMPOUND + result.data.add(NBT_Compound(nameLength.toByte(), name.toString())) + } - 10.toByte() -> { - result.data.add(NBT_Compound(nameLength.toByte(), name.toString())) } + + readingPosition++ } - - readingPosition++ + } catch (e: Exception) { + e.printStackTrace() } return result } + fun byteToString(byte: ByteArray, readingPosition: Int) { + + } + @Throws(IOException::class) fun convertFile(file: File): ByteArray? { return Files.readAllBytes(file.toPath()) diff --git a/src/main/kotlin/codes/mii/SaveEditor/SaveEditor.kt b/src/main/kotlin/codes/mii/SaveEditor/SaveEditor.kt index 214ed85..1262eca 100644 --- a/src/main/kotlin/codes/mii/SaveEditor/SaveEditor.kt +++ b/src/main/kotlin/codes/mii/SaveEditor/SaveEditor.kt @@ -10,12 +10,21 @@ class SaveEditor { val converter: Converter = Converter() fun start(args: Array) { - println("Minecraft Save Editor.") + println("NBT Editor.") if (args.count() >= 1) { val bytes = converter.convertFile(File(args[0])) + val inp = StringBuilder() + bytes?.forEach { + val n = it.toString(16) + inp.append(if (n.length == 1) { "0$n " } else { "$n " }) + } + println("input: $inp") + println("Converting...") val result = converter.convert(bytes!!) + println("Converted.\n\nresult\n") + result.data.forEach { when(it) { @@ -34,6 +43,22 @@ class SaveEditor { is NBT_Compound -> { println("COMPOUND, Name: ${it.name}") } + + is NBT_Int -> { + println("INT, Name: ${it.name}, Data: ${it.data}") + } + + is NBT_Short -> { + println("SHORT, Name: ${it.name}, Data: ${it.data}") + } + + is NBT_Long -> { + println("LONG, Name: ${it.name}, Data: ${it.data}") + } + + else -> { + println("UNKNOWN, ${it::class.java}") + } } } } diff --git a/src/main/kotlin/codes/mii/SaveEditor/Types/NBT_Short.kt b/src/main/kotlin/codes/mii/SaveEditor/Types/NBT_Short.kt new file mode 100644 index 0000000..638bd35 --- /dev/null +++ b/src/main/kotlin/codes/mii/SaveEditor/Types/NBT_Short.kt @@ -0,0 +1,5 @@ +package codes.mii.SaveEditor.Types + +class NBT_Short(override val nameLength: Byte, override val name: String, val data: Int) : Data { + override val typeByte: Byte = 2 +} \ No newline at end of file diff --git a/src/test/kotlin/codes/mii/SaveEditor/SaveEditorTest.kt b/src/test/kotlin/codes/mii/SaveEditor/SaveEditorTest.kt new file mode 100644 index 0000000..111bab1 --- /dev/null +++ b/src/test/kotlin/codes/mii/SaveEditor/SaveEditorTest.kt @@ -0,0 +1,14 @@ +package codes.mii.SaveEditor + +import org.junit.jupiter.api.Test + +import org.junit.jupiter.api.Assertions.* + +internal class SaveEditorTest { + + @Test + fun start() { + val args: Array = arrayOf("D:\\Git\\SaveEditor\\build\\libs\\test") + SaveEditor().start(args) + } +} \ No newline at end of file