diff options
author | Kevin Chabowski <kevin@kch42.de> | 2013-11-06 23:15:51 +0100 |
---|---|---|
committer | Kevin Chabowski <kevin@kch42.de> | 2013-11-06 23:15:51 +0100 |
commit | 291506b5ed49ffbefd9046a9c9f5a297f3e198ab (patch) | |
tree | 63060f6cf67f8bb0d45acc995a95dd0f516609d5 /listmaps.go | |
parent | 8150778cbdf2e2f72d300a548c669b07b6e98d0c (diff) | |
download | biomed-291506b5ed49ffbefd9046a9c9f5a297f3e198ab.tar.gz biomed-291506b5ed49ffbefd9046a9c9f5a297f3e198ab.tar.bz2 biomed-291506b5ed49ffbefd9046a9c9f5a297f3e198ab.zip |
Worlds are now opened by their level.dat and are centered properly.
The world spawn will be read from the level.dat and the view will be
centered to that position.
Diffstat (limited to 'listmaps.go')
-rw-r--r-- | listmaps.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/listmaps.go b/listmaps.go index ad8a0cc..8a1c088 100644 --- a/listmaps.go +++ b/listmaps.go @@ -42,12 +42,13 @@ func allMaps() map[string]string { } p := path.Join(savesDir, info.Name()) - fi, err := os.Stat(path.Join(p, "level.dat")) + leveldat := path.Join(p, "level.dat") + fi, err := os.Stat(leveldat) if (err != nil) || (!fi.Mode().IsRegular()) { continue } - maps[info.Name()] = path.Join(p, "region") + maps[info.Name()] = leveldat } return maps |