3
0
Mirror von https://github.com/ViaVersion/ViaVersion.git synchronisiert 2024-11-16 04:50:08 +01:00

Explain SerializerVersion terminology

Dieser Commit ist enthalten in:
FlorianMichael 2024-10-19 14:50:09 +02:00
Ursprung 4066a7b5b6
Commit c2d2c6d067

Datei anzeigen

@ -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),