diff --git a/world/world_position.go b/world/world_position.go index 5be2f73..51e6af6 100644 --- a/world/world_position.go +++ b/world/world_position.go @@ -35,6 +35,10 @@ type ChunkPos struct { Z int `json:"z"` } +func (cp ChunkPos) MarshalText() ([]byte, error) { + return []byte(fmt.Sprintf("%d %d", cp.Z, cp.Z)), nil +} + func (cp ChunkPos) ToFileName() string { return fmt.Sprintf("p.%d.%d.chunk", cp.X, cp.Z) }