Added chunk move spawning logic

This commit is contained in:
Shoghi Cervantes
2014-03-01 19:01:24 +01:00
parent dad2f21888
commit c2ad811451
3 changed files with 20 additions and 3 deletions

View File

@@ -265,12 +265,12 @@ class Player extends PlayerEntity{
if(!isset($this->chunksLoaded[$index])){
$this->chunksLoaded[$index] = 0xff;
}
$Yndex = $this->chunksLoaded[$index];
$this->chunksLoaded[$index] = 0; //Load them all
$X = null;
$Z = null;
PMFLevel::getXZ($index, $X, $Z);
$this->level->useChunk($X, $Z, $this);
$Yndex = $this->chunksLoaded[$index];
$this->chunksLoaded[$index] = 0; //Load them all
$pk = new ChunkDataPacket;
$pk->chunkX = $X;
$pk->chunkZ = $Z;