commoble.databuddy.codec

## Class ExtraCodecs

- java.lang.Object
- - commoble.databuddy.codec.ExtraCodecs

    public class ExtraCodecs
    extends java.lang.Object

Some helpful codecs for common classes in java and in vanilla minecraft that may often be serialized but have no builtin codecs

### Field Summary

Fields
`static com.mojang.serialization.Codec<net.minecraft.util.math.ChunkPos>` `CHUNK_POS` Serializes a ChunkPos to a record of its x- and z- coordinates
`static com.mojang.serialization.Codec<net.minecraft.util.math.ChunkPos>` `COMPRESSED_CHUNK_POS` Serializes a ChunkPos to a long, helpful for packets or other things where smallness is good and readability isn't necessary
`static com.mojang.serialization.Codec<net.minecraft.util.Direction>` `DIRECTION` Serializes a Direction, should serialize as a string when serialized to NBT or uncompressed json

### Constructor Summary

Constructors
Constructor and Description
`ExtraCodecs()`

### Method Summary

All Methods Static Methods Concrete Methods
`static <T> com.mojang.serialization.Codec<java.util.Set<T>>` `makeSetCodec(com.mojang.serialization.Codec<T> codec)` Creates a codec for a Set given a codec for T

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Field Detail

#### CHUNK_POS

    public static final com.mojang.serialization.Codec<net.minecraft.util.math.ChunkPos> CHUNK_POS

Serializes a ChunkPos to a record of its x- and z- coordinates

#### COMPRESSED_CHUNK_POS

    public static final com.mojang.serialization.Codec<net.minecraft.util.math.ChunkPos> COMPRESSED_CHUNK_POS

Serializes a ChunkPos to a long, helpful for packets or other things where smallness is good and readability isn't necessary

#### DIRECTION

    public static final com.mojang.serialization.Codec<net.minecraft.util.Direction> DIRECTION

Serializes a Direction, should serialize as a string when serialized to NBT or uncompressed json

### Constructor Detail

#### ExtraCodecs

    public ExtraCodecs()

### Method Detail

#### makeSetCodec

    public static <T> com.mojang.serialization.Codec<java.util.Set<T>> makeSetCodec(com.mojang.serialization.Codec<T> codec)

Creates a codec for a Set given a codec for T

Type Parameters:
  `T` - The type to make a set of
Parameters:
  `codec` - A codec for the type to make a set of
Returns:
  A codec for a Set of Ts