T - The output type of the deserializerpublic class SNbtSerializer<T extends net.lenni0451.mcstructs.nbt.INbtTag>
extends java.lang.Object
| Modifier and Type | Field and Description |
|---|---|
static SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag> |
LATEST
The latest SNbt serializer.
|
static SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag> |
V1_12
The SNbt serializer for minecraft 1.12.
|
static SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag> |
V1_13
The SNbt serializer for minecraft 1.13.
|
static SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag> |
V1_14
The SNbt serializer for minecraft 1.14 - 1.19.
|
static SNbtSerializer<net.lenni0451.mcstructs.nbt.INbtTag> |
V1_7
The SNbt serializer for minecraft 1.7.
|
static SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag> |
V1_8
The SNbt serializer for minecraft 1.8 - 1.11.
|
| Constructor and Description |
|---|
SNbtSerializer(java.util.function.Supplier<ISNbtSerializer> serializerSupplier,
java.util.function.Supplier<ISNbtDeserializer<T>> deserializerSupplier) |
| Modifier and Type | Method and Description |
|---|---|
T |
deserialize(java.lang.String s)
Deserialize a string to a tag.
|
ISNbtDeserializer<T> |
getDeserializer() |
ISNbtSerializer |
getSerializer() |
java.lang.String |
serialize(net.lenni0451.mcstructs.nbt.INbtTag tag)
Serialize a tag to a string.
|
T |
tryDeserialize(java.lang.String s)
Try to deserialize a string to a tag.
|
java.lang.String |
trySerialize(net.lenni0451.mcstructs.nbt.INbtTag tag)
Try to serialize a tag to a string.
|
public static final SNbtSerializer<net.lenni0451.mcstructs.nbt.INbtTag> V1_7
public static final SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag> V1_8
public static final SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag> V1_12
public static final SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag> V1_13
public static final SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag> V1_14
public static final SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag> LATEST
public SNbtSerializer(java.util.function.Supplier<ISNbtSerializer> serializerSupplier, java.util.function.Supplier<ISNbtDeserializer<T>> deserializerSupplier)
public ISNbtSerializer getSerializer()
public ISNbtDeserializer<T> getDeserializer()
public java.lang.String serialize(net.lenni0451.mcstructs.nbt.INbtTag tag)
throws SNbtSerializeException
tag - The tag to serializeSNbtSerializeException - If the tag could not be serialized@Nullable public java.lang.String trySerialize(net.lenni0451.mcstructs.nbt.INbtTag tag)
tag - The tag to serializepublic T deserialize(java.lang.String s) throws SNbtDeserializeException
s - The string to deserializeSNbtDeserializeException - If the string could not be deserialized@Nullable public T tryDeserialize(java.lang.String s)
s - The string to deserialize