From 291506b5ed49ffbefd9046a9c9f5a297f3e198ab Mon Sep 17 00:00:00 2001 From: Kevin Chabowski Date: Wed, 6 Nov 2013 23:15:51 +0100 Subject: 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. --- listmaps.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'listmaps.go') 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 -- cgit v1.2.3-54-g00ecf