netlib
Library for Kotlinx Serialization in Minecraft payloads.
Key Features
- Kotlinx Serialization encoders/decoders for working with Minecraft's FriendlyByteBuf/PacketByteBuf
- Abstract SerializedPayload class for simplified custom packet creation
- Compatibility with both Fabric and NeoForge loaders
Developer Usage
The project is intended to be included via Jar-in-Jar. netlib is available in the wanderia maven repository.
repositories {
maven("https://maven.wanderia.dev/releases") { name = "Wanderia" }
}
dependencies {
// Fabric
include("dev.wanderia:netlib-fabric:$version")
modImplementation("dev.wanderia:netlib-fabric:$version")
// NeoForge
jarJar(implementation("dev.wanderia:netlib-neoforge")) {
version {
strictly("[$version,)")
prefer("$version")
}
}
}
For usage examples, refer to the test mod in the project repository.