* More ??

* fix undefined variable
This commit is contained in:
Dylan K. Taylor
2016-11-30 10:07:37 +00:00
committed by GitHub
parent 43a36dba40
commit d6629d6843
15 changed files with 23 additions and 24 deletions

View File

@ -107,7 +107,7 @@ abstract class Biome{
* @return Biome
*/
public static function getBiome($id){
return isset(self::$biomes[$id]) ? self::$biomes[$id] : self::$biomes[self::OCEAN];
return self::$biomes[$id] ?? self::$biomes[self::OCEAN];
}
public function clearPopulators(){

View File

@ -81,6 +81,6 @@ class BiomeSelector{
$rainfall = (int) ($this->getRainfall($x, $z) * 63);
$biomeId = $this->map[$temperature + ($rainfall << 6)];
return isset($this->biomes[$biomeId]) ? $this->biomes[$biomeId] : $this->fallback;
return $this->biomes[$biomeId] ?? $this->fallback;
}
}