Make sure tag exists, prevent issues with bad world conversion

Addresses @legoboy0215's comments on #212
This commit is contained in:
Dylan K. Taylor 2016-12-31 10:24:21 +00:00
parent efc6d429f6
commit 25b9581254

View File

@ -248,7 +248,7 @@ class Chunk extends BaseFullChunk{
}
public function isLightPopulated(){
return $this->nbt["LightPopulated"] > 0;
return isset($this->nbt->LightPopulated) and $this->nbt->LightPopulated->getValue() > 0;
}
public function setLightPopulated($value = 1){