T - The output type of the deserializerpublic class SNbt<T extends net.lenni0451.mcstructs.nbt.NbtTag>
extends java.lang.Object
| Modifier and Type | Field | Description |
|---|---|---|
static SNbt<net.lenni0451.mcstructs.nbt.tags.CompoundTag> |
LATEST |
The latest SNbt serializer.
|
static SNbt<net.lenni0451.mcstructs.nbt.tags.CompoundTag> |
V1_12 |
The SNbt serializer for minecraft 1.12.
|
static SNbt<net.lenni0451.mcstructs.nbt.tags.CompoundTag> |
V1_13 |
The SNbt serializer for minecraft 1.13.
|
static SNbt<net.lenni0451.mcstructs.nbt.tags.CompoundTag> |
V1_14 |
The SNbt serializer for minecraft 1.14 - 1.21.4.
|
static SNbt<net.lenni0451.mcstructs.nbt.tags.CompoundTag> |
V1_21_5 |
The SNbt serializer for minecraft 1.21.5+.
|
static SNbt<net.lenni0451.mcstructs.nbt.NbtTag> |
V1_7 |
The SNbt serializer for minecraft 1.7.
|
static SNbt<net.lenni0451.mcstructs.nbt.tags.CompoundTag> |
V1_8 |
The SNbt serializer for minecraft 1.8 - 1.11.
|
| Constructor | Description |
|---|---|
SNbt(java.util.function.Supplier<SNbtSerializer> serializerSupplier,
java.util.function.Supplier<SNbtDeserializer<T>> deserializerSupplier) |
| Modifier and Type | Method | Description |
|---|---|---|
T |
deserialize(java.lang.String s) |
Deserialize a string to a tag.
|
SNbtDeserializer<T> |
getDeserializer() |
|
SNbtSerializer |
getSerializer() |
|
java.lang.String |
serialize(net.lenni0451.mcstructs.nbt.NbtTag 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.NbtTag tag) |
Try to serialize a tag to a string.
|
public static final SNbt<net.lenni0451.mcstructs.nbt.NbtTag> V1_7
public static final SNbt<net.lenni0451.mcstructs.nbt.tags.CompoundTag> V1_8
public static final SNbt<net.lenni0451.mcstructs.nbt.tags.CompoundTag> V1_12
public static final SNbt<net.lenni0451.mcstructs.nbt.tags.CompoundTag> V1_13
public static final SNbt<net.lenni0451.mcstructs.nbt.tags.CompoundTag> V1_14
public static final SNbt<net.lenni0451.mcstructs.nbt.tags.CompoundTag> V1_21_5
public static final SNbt<net.lenni0451.mcstructs.nbt.tags.CompoundTag> LATEST
public SNbt(java.util.function.Supplier<SNbtSerializer> serializerSupplier, java.util.function.Supplier<SNbtDeserializer<T>> deserializerSupplier)
public SNbtSerializer getSerializer()
public SNbtDeserializer<T> getDeserializer()
public java.lang.String serialize(net.lenni0451.mcstructs.nbt.NbtTag 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.NbtTag 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