mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-04-22 00:33:59 +00:00
Level: remove useless null checks for fastDeserialize() returns
This commit is contained in:
parent
d535fe20a3
commit
6047810113
@ -84,11 +84,6 @@ class PopulationTask extends AsyncTask{
|
||||
}
|
||||
}
|
||||
|
||||
if($chunk === null){
|
||||
//TODO error
|
||||
return;
|
||||
}
|
||||
|
||||
$manager->setChunk($chunk->getX(), $chunk->getZ(), $chunk);
|
||||
if(!$chunk->isGenerated()){
|
||||
$generator->generateChunk($chunk->getX(), $chunk->getZ());
|
||||
@ -150,11 +145,6 @@ class PopulationTask extends AsyncTask{
|
||||
|
||||
$chunk = Chunk::fastDeserialize($this->chunk);
|
||||
|
||||
if($chunk === null){
|
||||
//TODO error
|
||||
return;
|
||||
}
|
||||
|
||||
for($i = 0; $i < 9; ++$i){
|
||||
if($i === 4){
|
||||
continue;
|
||||
|
@ -41,10 +41,6 @@ class LightPopulationTask extends AsyncTask{
|
||||
public function onRun(){
|
||||
/** @var Chunk $chunk */
|
||||
$chunk = Chunk::fastDeserialize($this->chunk);
|
||||
if($chunk === null){
|
||||
//TODO error
|
||||
return;
|
||||
}
|
||||
|
||||
$chunk->recalculateHeightMap();
|
||||
$chunk->populateSkyLight();
|
||||
@ -58,10 +54,6 @@ class LightPopulationTask extends AsyncTask{
|
||||
if($level !== null){
|
||||
/** @var Chunk $chunk */
|
||||
$chunk = Chunk::fastDeserialize($this->chunk);
|
||||
if($chunk === null){
|
||||
//TODO error
|
||||
return;
|
||||
}
|
||||
$level->generateChunkCallback($chunk->getX(), $chunk->getZ(), $chunk);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user