PaperRegistryElementBinarySerializer

class PaperRegistryElementBinarySerializer<T : Keyed>(registryKey: RegistryKey<T>, registryAccess: RegistryAccess, enumEntries: Map<String, T> = emptyMap()) : UnversionedBinarySerializer<T>

A binary serializer for Paper registry elements that serializes the element by its key. For registry elements that are also an enum, enumEntries can be used to provide the enum name mapping as a secondary input format.

Constructors

Link copied to clipboard
constructor(registryKey: RegistryKey<T>, registryAccess: RegistryAccess, enumEntries: Map<String, T> = emptyMap())

Functions

Link copied to clipboard
override fun copy(obj: T?): T?
Link copied to clipboard
override fun read(reader: ByteReader): T?
Link copied to clipboard
override fun write(obj: T?, writer: ByteWriter)