mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
inf world fixes
This commit is contained in:
parent
7052af0609
commit
f829d6a693
2 changed files with 8 additions and 7 deletions
|
|
@ -192,7 +192,7 @@ class PMFLevel extends PMF{
|
|||
public function getBiomeId($x, $z){
|
||||
$X = $x >> 4;
|
||||
$Z = $z >> 4;
|
||||
$index = self::getIndex($X, $Z);
|
||||
$index = $this->getIndex($X, $Z);
|
||||
if(!isset($this->chunkInfo[$index])){
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -205,7 +205,7 @@ class PMFLevel extends PMF{
|
|||
public function setBiomeId($x, $z, $id){
|
||||
$X = $x >> 4;
|
||||
$Z = $z >> 4;
|
||||
$index = self::getIndex($X, $Z);
|
||||
$index = $this->getIndex($X, $Z);
|
||||
if(!isset($this->chunks[$index])){
|
||||
return 0;
|
||||
}
|
||||
|
|
@ -311,7 +311,7 @@ class PMFLevel extends PMF{
|
|||
|
||||
public function loadChunk($X, $Z){
|
||||
|
||||
$index = self::getIndex($X, $Z);
|
||||
$index = $this->getIndex($X, $Z);
|
||||
|
||||
if($this->isChunkLoaded($X, $Z)){
|
||||
return true;
|
||||
|
|
@ -359,10 +359,11 @@ class PMFLevel extends PMF{
|
|||
$this->chunkChange[$index][-1] = true;
|
||||
$this->chunkChange[$index][$Y] = 16384;
|
||||
$this->locationTable[$index][0] |= 1 << $Y;
|
||||
$this->chunkInfo[$index][0] = str_repeat("\x00", 256);
|
||||
return true;
|
||||
}
|
||||
public function initCleanChunk($X, $Z){
|
||||
$index = self::getIndex($X, $Z);
|
||||
$index = $this->getIndex($X, $Z);
|
||||
if(!isset($this->chunks[$index])){
|
||||
$this->chunks[$index] = array(
|
||||
0 => false,
|
||||
|
|
|
|||
|
|
@ -112,10 +112,10 @@ class Level{
|
|||
$orderedData = "";
|
||||
$orderedSkyLight = ""; //str_repeat("\xff", 16*16*64);
|
||||
$orderedLight = ""; //str_repeat("\xff", 16*16*64);
|
||||
$orderedBiomeIds = $this->level->chunkInfo[$this->level->getIndex($X, $Z)][0];
|
||||
$orderedBiomeIds = ""; //
|
||||
$orderedBiomeColors = str_repeat("\x00\x85\xb2\x4a", 256); // also PM 1.4
|
||||
$tileEntities = "";
|
||||
if($gen)$this->level->generateChunk($X, $Z, $this->generator);
|
||||
if($gen) $this->level->generateChunk($X, $Z, $this->generator);
|
||||
if(!$this->level->isChunkLoaded($X, $Z)){
|
||||
$this->level->loadChunk($X, $Z);
|
||||
}
|
||||
|
|
@ -124,7 +124,7 @@ class Level{
|
|||
for($y = 0; $y < 8; ++$y){
|
||||
$miniChunks[$y] = $gen ? $this->level->getMiniChunk($X, $Z, $y) : str_repeat("\x00", 8192);
|
||||
}
|
||||
|
||||
$orderedBiomeIds = $this->level->chunkInfo[$this->level->getIndex($X, $Z)][0];
|
||||
|
||||
for ($i = 0; $i < 16; $i++){
|
||||
for ($j = 0; $j < 16; $j++){
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue