Skip to content

CodecMapRegistry

Package: com.hypixel.hytale.server.core.plugin.registry

public class CodecMapRegistry<T, C extends Codec<? extends T>> implements IRegistry

Plugin registry for registering codec entries into a StringCodecMapCodec. Each registration maps a string ID and class to a codec, with an unregister callback that acquires the global asset write lock during cleanup. Supports optional Priority for ordering. Contains the inner Assets subclass for JsonAsset-specific registration using BuilderCodec.

ConstructorDescription
CodecMapRegistry(List<BooleanConsumer> unregister, StringCodecMapCodec<T, C> mapCodec)Creates a registry backed by the given codec map and unregister list.
MethodReturn TypeDescription
register(String id, Class<? extends T> aClass, C codec)CodecMapRegistry<T, C>Registers a codec entry by ID and class.
register(@Nonnull Priority priority, @Nonnull String id, Class<? extends T> aClass, C codec)CodecMapRegistry<T, C>Registers with explicit priority ordering.
shutdown()voidNo-op shutdown hook.
ClassDescription
Assets<T, C>Subclass for JsonAsset-typed registrations using AssetCodecMapCodec and BuilderCodec.
Hydex is an independent community resource. Hytale is a trademark of Hypixel Studios. Hydex is not affiliated with or endorsed by Hypixel Studios.