Fixed crash after level unload

This commit is contained in:
Shoghi Cervantes 2013-06-08 01:50:03 +02:00
parent 164b420af6
commit 13bfaaf7b8

View File

@ -741,6 +741,10 @@ class BlockAPI{
$pos = new Position($pos->x, $pos->y, $pos->z, $pos->level);
$block = $pos->level->getBlock($pos);
}
if($block === false){
return false;
}
$level = $block->onUpdate($type);
if($level === BLOCK_UPDATE_NORMAL){
$this->blockUpdateAround($block, $level);