Skip to content

Latest commit

 

History

History
23 lines (15 loc) · 604 Bytes

README.md

File metadata and controls

23 lines (15 loc) · 604 Bytes

go-nbt

This is a Go package used for parsing the NBT files used throughout Minecraft. For now, it only supports reading NBT files (both gzipped and not). Eventually I will add writing capabilities.

Usage

Reading

file, _ := ioutil.ReadFile("somefile.nbt")
z := bytes.NewReader(file)
data, _ := nbt.DecodeGzip(z)

var name string = data.Name()
var list []int32 = data.List("some list").Ints()
var compound *nbt.Compound = data.Compound("some compound")

See the test file (nbt_test.go) for more test cases.

Suggestions, comments, hatemail

Contact moshee on Rizon or Freenode.