Skip to content

BuiltInSerializersModule

val BuiltInSerializersModule: SerializersModule

A SerializersModule that registers Archie's Cloth Config-related type serializers (ModifierKeyCodeSerializer, ColorSerializer) as contextual serializers.

me.shedaniel.math.Color is pulled in transitively through cloth-config, but Archie's own config system exposes it directly in its own public API (unlike ModifierKeyCode, which stays behind net.kernelpanicsoft.archie.config.CommonKeyCode) - so basic-math (the small library that actually declares me.shedaniel.math.Color) is bundled for real (see each module's own build.gradle.kts) rather than left to Cloth Config's own optional presence, and ColorSerializer is registered unconditionally on both sides. ModifierKeyCode has no such bundled fallback - it's genuinely Cloth Config's own type, with no reason to touch it unless Cloth Config's own UI integration is in play - so ModifierKeyCodeSerializer stays behind both onClient (a dedicated server shouldn't class-load it) and isClothConfigLoaded (a client without Cloth Config installed shouldn't either).