diff --git a/.gradle/6.3/executionHistory/executionHistory.bin b/.gradle/6.3/executionHistory/executionHistory.bin
index 742ef7e..55b910d 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 432d8f2..5674195 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 59ef514..c15b543 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 a5d8d17..8e13755 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 87e167c..3419b88 100644
Binary files a/.gradle/buildOutputCleanup/buildOutputCleanup.lock and b/.gradle/buildOutputCleanup/buildOutputCleanup.lock differ
diff --git a/.idea/uiDesigner.xml b/.idea/uiDesigner.xml
new file mode 100644
index 0000000..e96534f
--- /dev/null
+++ b/.idea/uiDesigner.xml
@@ -0,0 +1,124 @@
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+ -
+
+
+
+
+ -
+
+
+ -
+
+
+
+
+
\ No newline at end of file
diff --git a/build/classes/kotlin/main/META-INF/SaveEditor.kotlin_module b/build/classes/kotlin/main/META-INF/SaveEditor.kotlin_module
index 984b7b5..b40fd13 100644
Binary files a/build/classes/kotlin/main/META-INF/SaveEditor.kotlin_module and b/build/classes/kotlin/main/META-INF/SaveEditor.kotlin_module differ
diff --git a/build/distributions/SaveEditor-1.0-SNAPSHOT.tar b/build/distributions/SaveEditor-1.0-SNAPSHOT.tar
index 5fd6100..7a6933e 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 4ba3507..4b4c101 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 73b65e2..b61d028 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_Short.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\ByteConvertExtensionKt.class;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 96fc95a..c234617 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 e372ad3..da75826 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 d206931..6c40c85 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 e812bdf..9030374 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.len b/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.len
index a363176..6f677df 100644
Binary files a/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.len and b/build/kotlin/compileKotlin/caches-jvm/inputs/source-to-output.tab.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 6e84e50..56cbfbe 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 ccb15f5..3faf243 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 24d5723..2b973f7 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.values.at b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.values.at
index 22f099d..55c8662 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/internal-name-to-source.tab b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab
index c1e477f..e2cf83e 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 3fa5962..99f64dc 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 45e4dd6..b92203c 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.len b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len
index a363176..6f677df 100644
Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.len and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/internal-name-to-source.tab.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 0a0fb3b..8cb1514 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 6e41dc9..4abc1d5 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/package-parts.tab b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab
index bdf584a..c3e7504 100644
Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab differ
diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream
index 7c057c2..a758e88 100644
Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream differ
diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len
index 19ced97..9ce7b83 100644
Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.keystream.len differ
diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.len b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.len
index 2a17e6e..01bdaa1 100644
Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.len and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.len differ
diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.values.at b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.values.at
index 46d6744..960edd7 100644
Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.values.at and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab.values.at differ
diff --git a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab_i b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab_i
index 9d9550c..e0a23af 100644
Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.tab_i and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/package-parts.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 7873e7e..183d756 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 12cd760..f87c2cf 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 bab82df..70d94cf 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.len b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.len
index 6f677df..003bc0e 100644
Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.len and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/proto.tab.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 b8ef5bf..66a0423 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 2798a3b..99e7ca8 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 a0db717..0c7ba92 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 3f1880c..ad16c01 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 e812bdf..9030374 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.len b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len
index a363176..6f677df 100644
Binary files a/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.len and b/build/kotlin/compileKotlin/caches-jvm/jvm/kotlin/source-to-classes.tab.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 c6c85b6..cb43ea2 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 d53c3a9..cb5aa72 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 44f5e59..b24be23 100644
--- a/build/kotlin/compileKotlin/caches-jvm/lookups/counters.tab
+++ b/build/kotlin/compileKotlin/caches-jvm/lookups/counters.tab
@@ -1,2 +1,2 @@
-57
-45
\ No newline at end of file
+73
+60
\ 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 987d871..b8e7c36 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 3f1880c..ad16c01 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 e812bdf..9030374 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.len b/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.len
index a363176..6f677df 100644
Binary files a/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.len and b/build/kotlin/compileKotlin/caches-jvm/lookups/file-to-id.tab.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 fa31454..1a7d9f9 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 4bf53d7..e767087 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 1c1fad6..ddcdb9c 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 f1b0492..ce7188d 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 00880dd..37934e8 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 5ffc1b2..6b9041b 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 0a0fb3b..8cb1514 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 91e6e6c..108d0fb 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 971b540..8593fae 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 a632873..e2e4bab 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 00b02bd..62bc50d 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 b152c43..96196b3 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 8a9e6e2..2d5fc99 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 1dbf30e..3ed2a3a 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 24671e4..9b8e8c2 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 76fd96b..d97d1bd 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 508416c..4a8f6bd 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 6146db3..6b20e33 100644
Binary files a/build/libs/SaveEditor-1.0-SNAPSHOT.jar and b/build/libs/SaveEditor-1.0-SNAPSHOT.jar differ
diff --git a/src/main/kotlin/codes/mii/SaveEditor/ByteConvertExtension.kt b/src/main/kotlin/codes/mii/SaveEditor/ByteConvertExtension.kt
new file mode 100644
index 0000000..df2ca97
--- /dev/null
+++ b/src/main/kotlin/codes/mii/SaveEditor/ByteConvertExtension.kt
@@ -0,0 +1,24 @@
+package codes.mii.SaveEditor
+
+import codes.mii.SaveEditor.Types.NBT_String
+
+val converter = Converter()
+
+@ExperimentalUnsignedTypes
+fun ByteArray.toNBT_String(position: Int): Pair {
+ var readingPosition = position
+
+ val nowByte = this[readingPosition]
+ val nameLength = converter.readMultiByteHex(this, readingPosition, 2).toInt()
+ readingPosition += 2
+ val name = converter.byteToString(this, readingPosition, nameLength)
+ readingPosition += nameLength
+
+ val textLength = converter.readMultiByteHex(this, readingPosition, 2).toInt()
+ readingPosition += 2
+
+ val text = converter.byteToString(this, readingPosition, textLength)
+ readingPosition += textLength
+
+ return NBT_String(nameLength.toByte(), name, textLength.toByte(), text) to 4 + nameLength + textLength
+}
\ No newline at end of file
diff --git a/src/main/kotlin/codes/mii/SaveEditor/Converter.kt b/src/main/kotlin/codes/mii/SaveEditor/Converter.kt
index eb13e18..92d9809 100644
--- a/src/main/kotlin/codes/mii/SaveEditor/Converter.kt
+++ b/src/main/kotlin/codes/mii/SaveEditor/Converter.kt
@@ -18,16 +18,13 @@ class Converter {
val nowByte = byte[readingPosition]
var nameLength = 0
- val name = StringBuilder()
+ var name = ""
if (nowByte != 0.toByte()) {
- nameLength = readMultiByte(byte, readingPosition, 2).toInt()
+ nameLength = readMultiByteHex(byte, readingPosition, 2).toInt()
readingPosition += 2
-
- repeat(nameLength) {
- readingPosition++
- name.append(hexToAscii(byte[readingPosition].toString(16)))
- }
+ name = byteToString(byte, readingPosition, nameLength)
+ readingPosition += nameLength
}
when (nowByte) {
@@ -38,35 +35,28 @@ class Converter {
1.toByte() -> { // BYTE
readingPosition++
- result.data.add(NBT_Byte(nameLength.toByte(), name.toString(), byte[readingPosition]))
+ result.data.add(NBT_Byte(nameLength.toByte(), name, byte[readingPosition]))
}
2.toByte(), 3.toByte(), 4.toByte() -> {
val n = when(nowByte) {
- 3.toByte() -> { 4 }
- 4.toByte() -> { 8 }
- else -> { 2 }
+ 3.toByte() -> 4
+ 4.toByte() -> 8
+ else -> 2
}
- result.data.add(NBT_Short(nameLength.toByte(), name.toString(), readMultiByte(byte, readingPosition, n).toInt()))
+ result.data.add(NBT_Short(nameLength.toByte(), name, readMultiByteHex(byte, readingPosition, n).toInt()))
readingPosition += n
}
8.toByte() -> { // STRING
-
- val textLength = readMultiByte(byte, readingPosition, 2).toInt()
- readingPosition += 2
-
- 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()))
+ readingPosition -= nameLength + 2
+ val res = byte.toNBT_String(readingPosition)
+ readingPosition += res.second
+ result.data.add(res.first)
}
10.toByte() -> { // COMPOUND
- result.data.add(NBT_Compound(nameLength.toByte(), name.toString()))
+ result.data.add(NBT_Compound(nameLength.toByte(), name))
}
}
@@ -79,7 +69,8 @@ class Converter {
return result
}
- fun readMultiByte(byte: ByteArray, position: Int, count: Int): Long {
+ @ExperimentalUnsignedTypes
+ fun readMultiByteHex(byte: ByteArray, position: Int, count: Int): Long {
var readingPosition = position
val multiByteText = StringBuilder()
repeat(count) {
@@ -94,15 +85,6 @@ class Converter {
return multiByteText.toString().toLong(16)
}
- fun byteToString(byte: ByteArray, readingPosition: Int) {
-
- }
-
- @Throws(IOException::class)
- fun convertFile(file: File): ByteArray? {
- return Files.readAllBytes(file.toPath())
- }
-
private fun hexToAscii(hexStr: String): String? {
val output = StringBuilder("")
var i = 0
@@ -113,4 +95,21 @@ class Converter {
}
return output.toString()
}
+
+ fun byteToString(byte: ByteArray, position: Int, count: Int): String {
+ var readingPosition = position
+ val name = StringBuilder()
+
+ repeat(count) {
+ readingPosition++
+ name.append(hexToAscii(byte[readingPosition].toString(16)))
+ }
+
+ return name.toString()
+ }
+
+ @Throws(IOException::class)
+ fun convertFile(file: File): ByteArray? {
+ return Files.readAllBytes(file.toPath())
+ }
}
\ No newline at end of file
diff --git a/src/main/kotlin/codes/mii/SaveEditor/Types/NBT_Int_Array.kt b/src/main/kotlin/codes/mii/SaveEditor/Types/NBT_Int_Array.kt
new file mode 100644
index 0000000..07555f7
--- /dev/null
+++ b/src/main/kotlin/codes/mii/SaveEditor/Types/NBT_Int_Array.kt
@@ -0,0 +1,5 @@
+package codes.mii.SaveEditor.Types
+
+class NBT_Int_Array(override val nameLength: Byte, override val name: String) : Data {
+ override val typeByte: Byte = 11
+}
\ No newline at end of file