public class NbtTextSerializer
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static NbtTextSerializer |
DEFAULT
A default instance of this serializer.
|
| Constructor and Description |
|---|
NbtTextSerializer() |
NbtTextSerializer(NbtBinarySerializer binary)
Construct a serializer with a custom binary serializer.
|
| Modifier and Type | Method and Description |
|---|---|
<TType> NbtWrapper<TType> |
deserialize(java.lang.String input)
Deserialize a NBT tag from a base-64 encoded string.
|
NbtCompound |
deserializeCompound(java.lang.String input)
Deserialize a NBT compound from a base-64 encoded string.
|
<T> NbtList<T> |
deserializeList(java.lang.String input)
Deserialize a NBT list from a base-64 encoded string.
|
NbtBinarySerializer |
getBinarySerializer()
Retrieve the binary serializer that is used.
|
<TType> java.lang.String |
serialize(NbtBase<TType> value)
Serialize a NBT tag to a base-64 encoded string.
|
public static final NbtTextSerializer DEFAULT
public NbtTextSerializer()
public NbtTextSerializer(NbtBinarySerializer binary)
binary - - binary serializer.public NbtBinarySerializer getBinarySerializer()
public <TType> java.lang.String serialize(NbtBase<TType> value)
value - - the NBT tag to serialize.public <TType> NbtWrapper<TType> deserialize(java.lang.String input) throws java.io.IOException
input - - the base-64 string.java.io.IOException - If we are unable to parse the input.public NbtCompound deserializeCompound(java.lang.String input) throws java.io.IOException
input - - the base-64 string.java.io.IOException - If we are unable to parse the input.public <T> NbtList<T> deserializeList(java.lang.String input) throws java.io.IOException
input - - the base-64 string.java.io.IOException - If we are unable to parse the input.