mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
Fixed crash after level unload
This commit is contained in:
parent
164b420af6
commit
13bfaaf7b8
1 changed files with 4 additions and 0 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue