Releases: Kneelawk/Codextra
Releases · Kneelawk/Codextra
Release list
v2.0.0+1.21.4
Changes:
- Updated to 1.21.4.
v2.0.0+1.21
Changes:
- Ported to Minecraft 1.21.
- Removed the deprecated
CodecOrUnit.
v2.0.0-beta.3+1.21
Codextra version 2.0.0-beta.3 for Minecraft 1.21
v2.0.0-beta.2+1.21
Codextra version 2.0.0-beta.2 for Minecraft 1.21
v2.0.0-beta.1+1.21
Codextra version 2.0.0-beta.1 for Minecraft 1.21
v1.1.0+1.20.6
Changes:
- Added
unitHandlingFieldOfmap-codec that allows unit codecs to function when the field key is missing. - Deprecated
CodecOrUnitin favor ofunitHandlingFieldOf.
v1.0.0+1.20.6
Changes:
- Initial Codextra Release!
- Added general purpose codecs:
errorHandlingMapCodec- Catches decoding errors and allows you to log them.keyCheckingMapCodec- Only decodes if a certain set of keys are present, otherwise returnsOptional.empty().mapKeyDispatchCodec- Like aKeyDispatchCodecbut allows the type-key to be a map-codec instead of a regular
codec.
- Added Ops-Attachments with codecs:
attachingCodec- Attaches an attachment.keyAttachingCodec- Attaches a decoded value as attachment(s).mutKeyAttachingCodec- Attaches a decoded value as an attachment, but allows that attachment to be mutated while
encoding.retrieve- Retrieves an attachment.retrieveWithCodec- Combines an attachment with a decoded value and returns that.ifPresentCodec- delegates to one codec if an attachment is present and another if the attachment is absent.dispatchCodec- Dispatches to different codecs depending on an attachment value.dispatchIfPresentCodec- Dispatches to different codecs depending on an attachment value or if the attachment is
absent.
- Ops-Attachments can be transferred from a
StreamCodeccontext to a DFUCodeccontext using Minecraft's
built-inByteBufCodecs.fromCodecandByteBufCodecs.fromCodecWithRegistries. - Added
CodecOrUnittype which can hold either a codec or a unit supplier. This is useful for when a unit-codec should
not write a field to its map at all.