Possible fix for #2061

This commit is contained in:
Shoghi Cervantes 2014-09-10 10:43:24 +02:00
parent bb34e06754
commit 8940360df4

View File

@ -880,6 +880,10 @@ class Level implements ChunkManager, Metadatable{
$pos = new Position($pos->x, $pos->y, $pos->z, $this);
}
$block->position($pos);
$index = Level::chunkHash($pos->x >> 4, $pos->z >> 4);
if(ADVANCED_CACHE == true){
Cache::remove("world:" . $this->getID() . ":" . $index);
}
if($direct === true){
$pk = new UpdateBlockPacket;
@ -898,10 +902,6 @@ class Level implements ChunkManager, Metadatable{
$pos = new Position($pos->x, $pos->y, $pos->z, $this);
}
$block->position($pos);
$index = Level::chunkHash($pos->x >> 4, $pos->z >> 4);
if(ADVANCED_CACHE == true){
Cache::remove("world:{$this->getID()}:{$index}");
}
if(!isset($this->changedBlocks[$index])){
$this->changedBlocks[$index] = [];
$this->changedCount[$index] = 0;