示例#1
0
    public void WriteDimensionCodec(DimensionCodec value)
    {
        var writer = new NbtWriter(this, "");

        value.WriteElement(writer);

        writer.EndCompound();
        writer.TryFinish();
    }
示例#2
0
    public static void Write(this DimensionCodec value, NbtList list)
    {
        var compound = new NbtCompound
        {
            new NbtTag <int>("id", value.Id),

            new NbtTag <string>("name", value.Name),

            value.WriteElement()
        };

        list.Add(compound);
    }