CodecMapRegistry
Package: com.hypixel.hytale.server.core.plugin.registry
public class CodecMapRegistry<T, C extends Codec<? extends T>> implements IRegistryPlugin 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.
Constructors
Section titled “Constructors”| Constructor | Description |
|---|---|
CodecMapRegistry(List<BooleanConsumer> unregister, StringCodecMapCodec<T, C> mapCodec) | Creates a registry backed by the given codec map and unregister list. |
Methods
Section titled “Methods”| Method | Return Type | Description |
|---|---|---|
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() | void | No-op shutdown hook. |
Inner Classes
Section titled “Inner Classes”| Class | Description |
|---|---|
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.