Class ThermooCodecs
java.lang.Object
com.github.thedeathlycow.thermoo.api.ThermooCodecs
Helpful codecs used by Thermoo. May be changed between MC versions as equivalent vanilla codecs are added.
Exposed in API for the convenience of API users.
-
Method Summary
Modifier and TypeMethodDescriptionstatic <E extends Enum<E>>
com.mojang.serialization.Codec<E> createEnumCodec(Class<E> clazz) Creates a codec for an Enum.
-
Method Details
-
createEnumCodec
Creates a codec for an Enum. Either uses the enum ordinal or the name, but prefers the ordinal for more efficient storage.- Type Parameters:
E- The enum type- Parameters:
clazz- The class of the enum.- Returns:
- Returns a codec for the enum class
-