public class TextComponentCodec_v1_20_5 extends TextComponentCodec
LATEST, V1_20_3, V1_20_5, V1_21_2| Modifier | Constructor and Description |
|---|---|
|
TextComponentCodec_v1_20_5() |
protected |
TextComponentCodec_v1_20_5(java.util.function.Supplier<net.lenni0451.mcstructs.snbt.SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag>> sNbtSerializerSupplier,
java.util.function.BiFunction<TextComponentCodec,net.lenni0451.mcstructs.snbt.SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag>,ITextComponentSerializer<com.google.gson.JsonElement>> jsonSerializerSupplier,
java.util.function.BiFunction<TextComponentCodec,net.lenni0451.mcstructs.snbt.SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag>,ITextComponentSerializer<net.lenni0451.mcstructs.nbt.INbtTag>> nbtSerializerSupplier) |
| Modifier and Type | Method and Description |
|---|---|
com.google.gson.JsonObject |
convertItemComponents(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag)
Verify and convert the given item component tag to a json object.
|
net.lenni0451.mcstructs.nbt.tags.CompoundTag |
convertItemComponents(com.google.gson.JsonObject json)
Verify and convert the given json object to a nbt tag.
|
void |
verifyEntity(net.lenni0451.mcstructs.core.Identifier identifier)
Verify if the given identifier is a valid entity.
|
void |
verifyItem(net.lenni0451.mcstructs.core.Identifier identifier)
Verify if the given identifier is a valid item.
|
void |
verifyItemComponents(net.lenni0451.mcstructs.nbt.INbtTag tag)
Verify if the given tag is a valid item component.
|
asSerializer, deserialize, deserialize, deserializeJson, deserializeJsonReader, deserializeJsonTree, deserializeLenientJson, deserializeNbt, deserializeNbtTree, getJsonSerializer, getNbtSerializer, serializeJsonString, serializeJsonTree, serializeNbt, serializeNbtStringpublic TextComponentCodec_v1_20_5()
protected TextComponentCodec_v1_20_5(java.util.function.Supplier<net.lenni0451.mcstructs.snbt.SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag>> sNbtSerializerSupplier,
java.util.function.BiFunction<TextComponentCodec,net.lenni0451.mcstructs.snbt.SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag>,ITextComponentSerializer<com.google.gson.JsonElement>> jsonSerializerSupplier,
java.util.function.BiFunction<TextComponentCodec,net.lenni0451.mcstructs.snbt.SNbtSerializer<net.lenni0451.mcstructs.nbt.tags.CompoundTag>,ITextComponentSerializer<net.lenni0451.mcstructs.nbt.INbtTag>> nbtSerializerSupplier)
public void verifyItem(net.lenni0451.mcstructs.core.Identifier identifier)
identifier - The identifier to verifypublic void verifyEntity(net.lenni0451.mcstructs.core.Identifier identifier)
identifier - The identifier to verifypublic void verifyItemComponents(net.lenni0451.mcstructs.nbt.INbtTag tag)
convertItemComponents(JsonObject) method should be used to verify json item components!tag - The tag to verifypublic com.google.gson.JsonObject convertItemComponents(net.lenni0451.mcstructs.nbt.tags.CompoundTag tag)
tag - The tag to convertpublic net.lenni0451.mcstructs.nbt.tags.CompoundTag convertItemComponents(com.google.gson.JsonObject json)
json - The json object to convert