Skip to content

lukebemishprojects/codecextras

Folders and files

NameName
Last commit message
Last commit date

Latest commit

4fd110f · Nov 19, 2024
Nov 19, 2024
Sep 11, 2024
Nov 18, 2024
Sep 8, 2024
Nov 19, 2024
Sep 3, 2024
Sep 3, 2024
Jul 23, 2024
Jul 16, 2023
Aug 30, 2024
Aug 6, 2024
Nov 19, 2024
Nov 19, 2024
Jun 28, 2024
Jul 7, 2024
Jul 7, 2024
Nov 19, 2024
Aug 29, 2024

Repository files navigation

CodecExtras

Version

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 maven central (as of v3; for instructions for older versions, check the README on the appropriate branch):

repositories {
    mavenCentral()
}

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 StreamCodecs and other MC-specific features, you will want to depend on the relevant artifact by capability. If using neoforge:

dependencies {
    implementation('dev.lukebemish:codecextras:<version>') {
        capabilities {
            requireFeature('minecraft-neoforge')
        }
    }
}

Or if using fabric:

dependencies {
    modImplementation('dev.lukebemish:codecextras:<version>') {
        capabilities {
            requireFeature('minecraft-fabric')
        }
    }
}

And if you need a platform-agnostic API for multiloader:

dependencies {
    implementation('dev.lukebemish:codecextras:<version>') {
        capabilities {
            requireFeature('minecraft-common')
        }
    }
}

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.