Class DatCodec
java.lang.Object
com.datdeveloper.datmoddingapi.util.DatCodec
A utility class containing various useful codecs
- 
Field SummaryFieldsModifier and TypeFieldDescriptionstatic final com.mojang.serialization.Codec<net.minecraft.world.level.ChunkPos> A Codec for handling ChunkPos
 This converts the chunkpos into an intstream, similar toBlockPosstatic final com.mojang.serialization.Codec<UUID> Deprecated.
- 
Method SummaryModifier and TypeMethodDescriptionstatic <E extends Enum<E>>
 com.mojang.serialization.Codec<E> getEnumCodec(Class<E> enumClass) A helper function to create a Codec that handles the given enum class
 The resulting codec will convert the enum into a string for storage
- 
Field Details- 
UUID_CODECDeprecated.UseUUIDUtil.CODECinsteadA Codec for handling UUID
 Converts it into a string for storage
- 
CHUNKPOSpublic static final com.mojang.serialization.Codec<net.minecraft.world.level.ChunkPos> CHUNKPOSA Codec for handling ChunkPos
 This converts the chunkpos into an intstream, similar toBlockPos- See Also:
 
 
- 
- 
Method Details- 
getEnumCodecpublic static <E extends Enum<E>> com.mojang.serialization.Codec<E> getEnumCodec(Class<E> enumClass) A helper function to create a Codec that handles the given enum class
 The resulting codec will convert the enum into a string for storage- Type Parameters:
- E- The Enum Type
- Parameters:
- enumClass- The class of the enum
- Returns:
- A Codec that handles the given enum class
 
 
- 
UUIDUtil.CODECinstead