diff --git a/app/config.go b/app/config.go index 80cd7db..56e3b60 100644 --- a/app/config.go +++ b/app/config.go @@ -72,10 +72,10 @@ func ParseConfig(filename string) (*Config, error) { rstate := RenderStateType{ InitialRun: true, - LastX: coords.MinCoord, - LastY: coords.MinCoord, - LastZ: coords.MinCoord, - LastMtime: 0, + LastX: coords.MinCoord-1, + LastY: coords.MinCoord-1, + LastZ: coords.MinCoord-1, + LastMtime: 1, } layers := []layer.Layer{ diff --git a/db/sqlite.go b/db/sqlite.go index c29adfb..f9c4895 100644 --- a/db/sqlite.go +++ b/db/sqlite.go @@ -73,7 +73,7 @@ const getLegacyBlockQuery = ` select pos,data,mtime from blocks b where b.mtime == 0 -and b.pos >= ? +and b.pos > ? order by b.pos asc limit ? ` diff --git a/initialrenderer/job.go b/initialrenderer/job.go index 826b3ea..a0e9464 100644 --- a/initialrenderer/job.go +++ b/initialrenderer/job.go @@ -22,9 +22,7 @@ func Job(ctx *app.App) { panic(err) } - lastcoords = *newlastcoords - - if len(mblist) <= 1 { + if len(mblist) == 0 { logrus.Info("Initial rendering complete") rstate.InitialRun = false ctx.Config.Save() @@ -32,6 +30,8 @@ func Job(ctx *app.App) { break } + lastcoords = *newlastcoords + //for _, mb := range mblist { //}