Class NBTSerializer<IN,OUT>
java.lang.Object
com.github.retrooper.packetevents.protocol.nbt.serializer.NBTSerializer<IN,OUT>
- Direct Known Subclasses:
DefaultNBTSerializer
-
Nested Class Summary
Modifier and TypeClassDescriptionprotected static interface
protected static interface
protected static interface
protected static interface
protected static interface
NBTSerializer.TagReader<IN,
T extends NBT> static interface
NBTSerializer.TagWriter<OUT,
T extends NBT> -
Field Summary
Modifier and TypeFieldDescriptionprotected final NBTSerializer.IdReader
<IN> protected final NBTSerializer.IdWriter
<OUT> protected final NBTSerializer.NameReader
<IN> protected final NBTSerializer.NameWriter
<OUT> -
Constructor Summary
ConstructorDescriptionNBTSerializer
(NBTSerializer.IdReader<IN> idReader, NBTSerializer.IdWriter<OUT> idWriter, NBTSerializer.NameReader<IN> nameReader, NBTSerializer.NameWriter<OUT> nameWriter) -
Method Summary
Modifier and TypeMethodDescriptiondeserializeTag
(NBTLimiter limiter, IN from, boolean named) protected <T extends NBT>
voidregisterType
(NBTType<T> type, int id, NBTSerializer.TagReader<IN, T> typeReader, NBTSerializer.TagWriter<OUT, T> typeWriter) void
serializeTag
(OUT to, NBT tag, boolean named) Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.github.retrooper.packetevents.protocol.nbt.serializer.NBTReader
deserializeTag
Methods inherited from interface com.github.retrooper.packetevents.protocol.nbt.serializer.NBTWriter
serializeTag
-
Field Details
-
idReader
-
idWriter
-
nameReader
-
nameWriter
-
idToType
-
typeToId
-
typeReaders
-
typeWriters
-
-
Constructor Details
-
NBTSerializer
public NBTSerializer(NBTSerializer.IdReader<IN> idReader, NBTSerializer.IdWriter<OUT> idWriter, NBTSerializer.NameReader<IN> nameReader, NBTSerializer.NameWriter<OUT> nameWriter)
-
-
Method Details
-
deserializeTag
- Specified by:
deserializeTag
in interfaceNBTReader<IN,
OUT> - Throws:
IOException
-
serializeTag
- Specified by:
serializeTag
in interfaceNBTWriter<IN,
OUT> - Throws:
IOException
-
registerType
protected <T extends NBT> void registerType(NBTType<T> type, int id, NBTSerializer.TagReader<IN, T> typeReader, NBTSerializer.TagWriter<OUT, T> typeWriter)
-