Various extensions to the codecs from Mojang's DFU, including:
- Codecs with comments
- Record codecs with large numbers of entries
- Codecs which decode to a different type than they encode from
- Codecs representing changes to mutable data
Artifacts are available on my maven:
repositories {
maven {
url = 'https://maven.lukebemish.dev/releases'
}
}
The main artifact depends only on DFU and org.slf4j:slf4j-api
, and may be jar-in-jar-ed:
dependencies {
implementation('dev.lukebemish:codecextras:<version>')
}
For utilities supporting StreamCodec
s, you will want to depend on the relevant artifact by capability:
dependencies {
implementation('dev.lukebemish:codecextras:<version>') {
capabilities {
requireCapability('dev.lukebemish:codecextras-stream')
}
}
}
Or if using fabric:
dependencies {
modImplementation('dev.lukebemish:codecextras:<version>') {
capabilities {
requireCapability('dev.lukebemish:codecextras-stream-intermediary')
}
}
}
This element depends on the main artifact, and may also be jar-in-jar-ed -- though you may need to use a newer version of loom or NeoGradle for support for capabilities in jar-in-jar.