mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-23 04:59:46 +00:00
added a temp fix for normalgen
This commit is contained in:
parent
f829d6a693
commit
1a8ef21f19
2 changed files with 5 additions and 2 deletions
|
|
@ -206,7 +206,7 @@ class PMFLevel extends PMF{
|
||||||
$X = $x >> 4;
|
$X = $x >> 4;
|
||||||
$Z = $z >> 4;
|
$Z = $z >> 4;
|
||||||
$index = $this->getIndex($X, $Z);
|
$index = $this->getIndex($X, $Z);
|
||||||
if(!isset($this->chunks[$index])){
|
if(!isset($this->chunkInfo[$index])){
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
$aX = $x & 15;
|
$aX = $x & 15;
|
||||||
|
|
@ -254,7 +254,9 @@ class PMFLevel extends PMF{
|
||||||
|
|
||||||
$chunk = @gzopen($this->getChunkPath($X, $Z), "wb" . PMF_LEVEL_DEFLATE_LEVEL);
|
$chunk = @gzopen($this->getChunkPath($X, $Z), "wb" . PMF_LEVEL_DEFLATE_LEVEL);
|
||||||
$bitmap = 0;
|
$bitmap = 0;
|
||||||
gzwrite($chunk, $this->chunkInfo[$index][0]);
|
$biomedata = $this->chunkInfo[$index][0];
|
||||||
|
if(strlen($biomedata) < 256) $biomedata = str_repeat("\x01", 256);
|
||||||
|
gzwrite($chunk, $biomedata);
|
||||||
for($Y = 0; $Y < $this->levelData["height"]; ++$Y){
|
for($Y = 0; $Y < $this->levelData["height"]; ++$Y){
|
||||||
if($this->chunks[$index][$Y] !== false and ((isset($this->chunkChange[$index][$Y]) and $this->chunkChange[$index][$Y] === 0) or !$this->isMiniChunkEmpty($X, $Z, $Y))){
|
if($this->chunks[$index][$Y] !== false and ((isset($this->chunkChange[$index][$Y]) and $this->chunkChange[$index][$Y] === 0) or !$this->isMiniChunkEmpty($X, $Z, $Y))){
|
||||||
gzwrite($chunk, $this->chunks[$index][$Y]);
|
gzwrite($chunk, $this->chunks[$index][$Y]);
|
||||||
|
|
|
||||||
|
|
@ -447,6 +447,7 @@ class Level{
|
||||||
if(!isset($this->level)){
|
if(!isset($this->level)){
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
if(strlen($data) != 16384) console(strlen($data));
|
||||||
$this->changedCount[$X . ":" . $Y . ":" . $Z] = 4096;
|
$this->changedCount[$X . ":" . $Y . ":" . $Z] = 4096;
|
||||||
if(ADVANCED_CACHE == true){
|
if(ADVANCED_CACHE == true){
|
||||||
Cache::remove("world:{$this->name}:$X:$Z");
|
Cache::remove("world:{$this->name}:$X:$Z");
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue