Fix for spawn point

This commit is contained in:
Shoghi Cervantes Pueyo 2012-12-25 17:00:47 +01:00
parent 0cb8f28122
commit 9f3523a920
2 changed files with 2 additions and 1 deletions

View File

@ -348,7 +348,7 @@ class Generator{
"RandomSeed" => $this->seed, "RandomSeed" => $this->seed,
"SpawnX" => $s[0], "SpawnX" => $s[0],
"SpawnY" => $s[1], "SpawnY" => $s[1],
"SpawnX" => $s[2], "SpawnZ" => $s[2],
); );
file_put_contents($dir."level.dat", serialize($level)); file_put_contents($dir."level.dat", serialize($level));
} }

View File

@ -228,6 +228,7 @@ class PocketMinecraftServer extends stdClass{
$this->seed = (int) $this->level["RandomSeed"]; $this->seed = (int) $this->level["RandomSeed"];
$this->spawn = array("x" => $level["SpawnX"], "y" => $level["SpawnY"], "z" => $level["SpawnZ"]); $this->spawn = array("x" => $level["SpawnX"], "y" => $level["SpawnY"], "z" => $level["SpawnZ"]);
$this->level["Time"] = &$this->time; $this->level["Time"] = &$this->time;
console("[INFO] Spawn: X ".$level["SpawnX"]." Y ".$level["SpawnY"]." Z ".$level["SpawnZ"]);
console("[INFO] Time: ".$this->time); console("[INFO] Time: ".$this->time);
console("[INFO] Seed: ".$this->seed); console("[INFO] Seed: ".$this->seed);
console("[INFO] Gamemode: ".($this->gamemode === 0 ? "survival":"creative")); console("[INFO] Gamemode: ".($this->gamemode === 0 ? "survival":"creative"));