90% of ad revenue goes to creators. Go ad-free while supporting creators with Modrinth Plus. Subscribe today!
Kinecraft Serialization
https://github.com/SettingDust/kinecraft-serialization
It's a lib for (de)serializing minecraft tag(NBT), chat component, ByteBuf with any serializable objects.
Writing in kotlin and works with kotlinx.serialization
And with
- tag serializers you can describe tags with the correct type instead of string. So that it will encode/decode with the format you are using as "real" type of the tag.
Usage
repositories {
exclusiveContent {
forRepository {
maven("https://api.modrinth.com/maven") {
name = "Modrinth"
}
}
filter {
includeGroup("maven.modrinth")
}
}
}
dependencies {
val kinecraftSerializationVersion = "1.6.7"
compileOnly("maven.modrinth:kinecraft-serialization:$kinecraftSerializationVersion:common")
// Fabric Loom
runtimeOnly("maven.modrinth:kinecraft-serialization:$kinecraftSerializationVersion:fabric")
include("maven.modrinth:kinecraft-serialization:$kinecraftSerializationVersion")
// NeoGradle
runtimeOnly("maven.modrinth:kinecraft-serialization:$kinecraftSerializationVersion:neoforge")
jarInJar("maven.modrinth:kinecraft-serialization:$kinecraftSerializationVersion")
}
MinecraftTag
is for serialization between data class and Minecraft tag classes.
Reading tag test and bytebuf test for more usage
Links
Details
Licensed MIT
Published a year ago
Updated 2 months ago