-
Notifications
You must be signed in to change notification settings - Fork 116
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Example to save chunks from a server #267
Comments
Hi, you can take a look at the "daze" example, when server sends a chunk, the |
Thanks. I was using that before but could not figure out how to save normal minecraft chunks or even view the blocks. I am new to this. |
You can use the |
I am using this code: func onChunkLoad(pos level.ChunkPos) error {
chunk := worldManager.Columns[pos]
saveChunk := new(save.Chunk)
err := level.ChunkToSave(chunk, saveChunk)
if err != nil {
log.Println(err)
return err
}
file, _ := os.Create(fmt.Sprintf("chunks/r.%d.%d.mca", pos[0], pos[1]))
defer file.Close()
data, err := saveChunk.Data(1)
if err != nil {
log.Println(err)
return err
}
file.Write(data)
return nil
} but I am getting |
The data scheme inside |
Hello,
Is there an example to simply join a server and view the chunks given by the server?
Thank you.
The text was updated successfully, but these errors were encountered: