Package net.orbyfied.j8.util.nbt
Interface CompoundTagSerializer<T>
- Type Parameters:
T- The value type.
public interface CompoundTagSerializer<T>
A serializer for type T which should define
the functionality needed to serialize and
deserialize a value of type T to and from a
compound tag respectively.
-
Method Summary
Modifier and TypeMethodDescriptionShould (possibly deep-) clone the object to be used inTag.copy().read(net.minecraft.nbt.CompoundTag tag) Should read a value of type T from the provided input tag.voidShould write the provided value into the provided output tag.
-
Method Details
-
write
Should write the provided value into the provided output tag.- Parameters:
tag- The output tag.v- The value.- Throws:
IOException
-
read
Should read a value of type T from the provided input tag.- Parameters:
tag- The input tag.- Returns:
- The value.
- Throws:
IOException
-
copy
Should (possibly deep-) clone the object to be used inTag.copy().- Parameters:
original- The original object.- Returns:
- The clone.
-