net.kernelpanicsoft.archie.serialization.serializers¶
Types¶
BlockHitResultSerializer¶
object BlockHitResultSerializer : KSerializer<BlockHitResult>
A KSerializer for BlockHitResult that encodes the hit location, face direction, block position, whether the hit is inside the block, and whether it was a miss.
BlockPosSerializer¶
object BlockPosSerializer : KSerializer<BlockPos>
A KSerializer for BlockPos that encodes/decodes the three integer components.
ChunkPosSerializer¶
object ChunkPosSerializer : KSerializer<ChunkPos>
A KSerializer for ChunkPos that encodes/decodes the value as a single packed Long.
ColorSerializer¶
object ColorSerializer : KSerializer<Color>
A KSerializer for Cloth Config's Color that encodes/decodes as an #AARRGGBB hex string.
FriendlyByteBufSerializer¶
object FriendlyByteBufSerializer : KSerializer<FriendlyByteBuf>
A KSerializer for FriendlyByteBuf that encodes/decodes the buffer contents as a raw byte array.
GlobalPosSerializer¶
object GlobalPosSerializer : KSerializer<GlobalPos>
A KSerializer for GlobalPos that encodes the dimension ResourceKey and BlockPos.
ModifierKeyCodeSerializer¶
object ModifierKeyCodeSerializer : KSerializer<ModifierKeyCode>
A KSerializer for Cloth Config's ModifierKeyCode (a keybind plus its held modifier).
ResourceKeySerializer¶
class ResourceKeySerializer<T : Any>(val registry: ResourceKey<out Registry<T>>) : KSerializer<ResourceKey<*>>
A KSerializer for ResourceKey of a specific registry.
ResourceLocationSerializer¶
object ResourceLocationSerializer : KSerializer<ResourceLocation>
A KSerializer for ResourceLocation that encodes/decodes its namespace:path string form.
SBlockHitResult¶
typealias SBlockHitResult = BlockHitResult
Contextual type-alias for BlockHitResult that uses BlockHitResultSerializer when the field is annotated with @Contextual.
SBlockPos¶
typealias SBlockPos = BlockPos
Contextual type-alias for BlockPos that uses BlockPosSerializer when the field is annotated with @Contextual.
SChunkPos¶
typealias SChunkPos = ChunkPos
Contextual type-alias for ChunkPos that uses ChunkPosSerializer when the field is annotated with @Contextual.
SColor¶
typealias SColor = Color
Contextual type-alias for Cloth Config's Color that uses ColorSerializer when the field is annotated with @Contextual.
SFriendlyByteBuf¶
typealias SFriendlyByteBuf = FriendlyByteBuf
Contextual type-alias for FriendlyByteBuf that uses FriendlyByteBufSerializer when the field is annotated with @Contextual.
SGlobalPos¶
typealias SGlobalPos = GlobalPos
Contextual type-alias for GlobalPos that uses GlobalPosSerializer when the field is annotated with @Contextual.
SItemStack¶
typealias SItemStack = ItemStack
Contextual type-alias for ItemStack that uses a net.kernelpanicsoft.archie.serialization.CodecSerializer over ItemStack.CODEC when the field is annotated with @Contextual.
SModifierKeyCode¶
typealias SModifierKeyCode = ModifierKeyCode
Contextual type-alias for Cloth Config's ModifierKeyCode that uses ModifierKeyCodeSerializer when the field is annotated with @Contextual.
SResourceLocation¶
typealias SResourceLocation = ResourceLocation
Contextual type-alias for ResourceLocation that uses ResourceLocationSerializer when the field is annotated with @Contextual.
SVec3¶
typealias SVec3 = Vec3
Contextual type-alias for Vec3 that uses Vec3Serializer when the field is annotated with @Contextual.
SVec3i¶
typealias SVec3i = Vec3i
Contextual type-alias for Vec3i that uses Vec3iSerializer when the field is annotated with @Contextual.
Vec3iSerializer¶
object Vec3iSerializer : KSerializer<Vec3i>
A KSerializer for Vec3i (and its subclass BlockPos) that encodes/decodes the three integer components.
Vec3Serializer¶
object Vec3Serializer : KSerializer<Vec3>
A KSerializer for Vec3 that encodes/decodes the three double-precision components.
Properties¶
BuiltInSerializersModule¶
val BuiltInSerializersModule: SerializersModule
A SerializersModule that registers Archie's Cloth Config-related type serializers (ModifierKeyCodeSerializer, ColorSerializer) as contextual serializers.
MinecraftSerializersModule¶
val MinecraftSerializersModule: SerializersModule
A SerializersModule that registers all built-in Minecraft type serializers as contextual serializers.