mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Removed seed and spawn from server.properties
This commit is contained in:
parent
30a13fb1b4
commit
022e25ff05
4 changed files with 22 additions and 38 deletions
|
|
@ -334,9 +334,23 @@ class Generator{
|
|||
return $chunk;
|
||||
}
|
||||
|
||||
public function save($file){
|
||||
@mkdir(dirname($file), 0777, true);
|
||||
return file_put_contents($file, $this->raw);
|
||||
public function save($dir, $name){
|
||||
@mkdir($dir, 0777, true);
|
||||
file_put_contents($dir."chunks.dat", $this->raw);
|
||||
$s = $this->getSpawn();
|
||||
$array = array();
|
||||
file_put_contents($dir."entities.dat", serialize($array));
|
||||
file_put_contents($dir."tileEntities.dat", serialize($array));
|
||||
$level = array(
|
||||
"LevelName" => $name,
|
||||
"Time" => 0,
|
||||
"Gamemode" => 1,
|
||||
"RandomSeed" => $this->seed,
|
||||
"SpawnX" => $s[0],
|
||||
"SpawnY" => $s[1],
|
||||
"SpawnX" => $s[2],
|
||||
);
|
||||
file_put_contents($dir."level.dat", serialize($level));
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue