import ( "bytes" "fmt" "github.com/Tnze/go-mc/nbt" ) func main() { // Create a new Compound c := nbt.NewCompound() // Add some tags c.Set("name", nbt.String("Alex")) c.Set("age", nbt.Int32(25)) c.Set("position", nbt.List{ nbt.Int32(10), nbt.Int32(20), nbt.Int32(30), }) // Encode the Compound to a byte slice data, err := nbt.Marshal(c) if err != nil { panic(err) } // Decode the byte slice back to a Compound var c2 nbt.Compound err = nbt.Unmarshal(data, &c2) if err != nil { panic(err) } // Print the values of some tags in the Compound fmt.Println(c2.Get("name").StringVal()) fmt.Println(c2.Get("position").ListVal()[2].Int32Val()) }In this example, we create a new Compound and add some tags of different data types. We then encode the Compound to a byte slice using the `Marshal` function and decode it back to a new Compound using the `Unmarshal` function. Finally, we print the values of some tags in the new Compound. The package library used in this example is `github.com/Tnze/go-mc/nbt`, which provides a high-level API for working with Minecraft-related NBT data structures.