接口 IAttachmentSerializer<T>
- 类型参数:
T
- The type of the data attachment.
public interface IAttachmentSerializer<T>
Serializer for data attachments.
-
方法概要
修饰符和类型方法说明read
(IAttachmentHolder holder, ValueInput input) Reads the attachment from NBT.boolean
write
(T attachment, ValueOutput output) Writes the attachment to the value output, or returnsfalse
if it is should not be serialized.
-
方法详细资料
-
read
Reads the attachment from NBT.- 参数:
holder
- the holder for the attachment, can be cast if the subtype is knowninput
- the input to read from
-
write
Writes the attachment to the value output, or returnsfalse
if it is should not be serialized.If
false
is returned, any data written to the value output by this method will be discarded.
-