Skip to content
/ gonbt Public

go nbt parser to read and write minecraft data

License

Notifications You must be signed in to change notification settings

ymohl-cl/gonbt

Repository files navigation

GONBT

Go because this project is written in Golang and NBT because it is a nbt parser  :v: 

Build status Codecov

GoDoc Sourcegraph GoReportCard Discord License

Description

The Named Binary Tag (NBT) format is used by Minecraft for the various files in which it saves data... the next on wiki  :sunglasses: 

This gonbt package marshal and unmarshal nbt data in a readable format see tag.go

Installation

Easy to install like all go packages  :grin: 

<$ go get -u github.com/ymohl-cl/gonbt

Usage

// To read
func main() {
    var dataIn []byte // your nbt data
    var err error

    if tag, err = gonbt.Unmarshal(dataIn); err != nil {
      panic(err)
    }
}
// To write
func main() {
    var tag gonbt.Tag // your data to convert in nbt format
    var err error

    if tag, err = gonbt.Marshal(tag, gonbt.CompressNone); err != nil {
      panic(err)
    }
}

Roadmap

The next should be convert Tag to golang struct with specific field's tag like json or other parser stuf

Contributing

 :grey_exclamation:  Use issues for everything

  • For a small change, just send a PR.
  • For bigger changes open an issue for discussion before sending a PR.
  • PR should have:
    • Test case
    • Documentation
    • Example (If it makes sense)
  • You can also contribute by:
    • Reporting issues
    • Suggesting new features or enhancements
    • Improve/fix documentation

Thank you  :pray:  :+1: 

Licence

MIT

About

go nbt parser to read and write minecraft data

Resources

License

Stars

Watchers

Forks

Packages

No packages published