summaryrefslogtreecommitdiff
path: root/mcmap/examples
diff options
context:
space:
mode:
Diffstat (limited to 'mcmap/examples')
-rw-r--r--mcmap/examples/emeraldfinder/main.go3
-rw-r--r--mcmap/examples/mapper/main.go2
-rw-r--r--mcmap/examples/replace/main.go2
3 files changed, 3 insertions, 4 deletions
diff --git a/mcmap/examples/emeraldfinder/main.go b/mcmap/examples/emeraldfinder/main.go
index 8cd1260..d92ad3c 100644
--- a/mcmap/examples/emeraldfinder/main.go
+++ b/mcmap/examples/emeraldfinder/main.go
@@ -48,7 +48,6 @@ chunkLoop:
}
}
- chunk = nil
- region.UnloadChunk(cx, cz)
+ chunk.MarkUnused()
}
}
diff --git a/mcmap/examples/mapper/main.go b/mcmap/examples/mapper/main.go
index e998ce1..2cbcefb 100644
--- a/mcmap/examples/mapper/main.go
+++ b/mcmap/examples/mapper/main.go
@@ -60,7 +60,7 @@ chunkLoop:
}
}
- if err := region.UnloadChunk(cx, cz); err != nil {
+ if err := chunk.MarkUnused(); err != nil {
fmt.Fprintf(os.Stderr, "Error while unloading chunk %d, %d: %s\n", cx, cz, err)
os.Exit(1)
}
diff --git a/mcmap/examples/replace/main.go b/mcmap/examples/replace/main.go
index 127f446..e5fff78 100644
--- a/mcmap/examples/replace/main.go
+++ b/mcmap/examples/replace/main.go
@@ -54,7 +54,7 @@ chunkLoop:
chunk.MarkModified()
}
- if err := region.UnloadChunk(cx, cz); err != nil {
+ if err := chunk.MarkUnused(); err != nil {
fmt.Fprintf(os.Stderr, "Error while unloading chunk %d, %d: %s\n", cx, cz, err)
os.Exit(1)
}