Explain SerializerVersion terminology

This commit is contained in:
FlorianMichael 2024-10-19 14:50:09 +02:00
parent 4066a7b5b6
commit c2d2c6d067

View File

@ -19,6 +19,7 @@ package com.viaversion.viaversion.util;
import com.google.gson.JsonElement;
import com.viaversion.nbt.tag.Tag;
import com.viaversion.viaversion.rewriter.ComponentRewriter;
import net.lenni0451.mcstructs.snbt.SNbtSerializer;
import net.lenni0451.mcstructs.snbt.exceptions.SNbtDeserializeException;
import net.lenni0451.mcstructs.snbt.exceptions.SNbtSerializeException;
@ -26,6 +27,13 @@ import net.lenni0451.mcstructs.text.ATextComponent;
import net.lenni0451.mcstructs.text.serializer.TextComponentCodec;
import net.lenni0451.mcstructs.text.serializer.TextComponentSerializer;
/**
* Wrapper enum to unify text component and string nbt serialization functions across different versions.
* Only contains versions which have actual changes we handle.
*
* @see ComponentUtil
* @see ComponentRewriter
*/
public enum SerializerVersion {
V1_6(TextComponentSerializer.V1_6, null),
V1_7(TextComponentSerializer.V1_7, SNbtSerializer.V1_7),