mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
@ -87,9 +87,9 @@ class Flat extends Generator{
|
||||
$this->preset = $preset;
|
||||
$preset = explode(";", $preset);
|
||||
$version = (int) $preset[0];
|
||||
$blocks = isset($preset[1]) ? $preset[1] : "";
|
||||
$biome = isset($preset[2]) ? $preset[2] : 1;
|
||||
$options = isset($preset[3]) ? $preset[3] : "";
|
||||
$blocks = $preset[1] ?? "";
|
||||
$biome = $preset[2] ?? 1;
|
||||
$options = $preset[3] ?? "";
|
||||
preg_match_all('#^(([0-9]*x|)([0-9]{1,3})(|:[0-9]{0,2}))$#m', str_replace(",", "\n", $blocks), $matches);
|
||||
$y = 0;
|
||||
$this->structure = [];
|
||||
|
@ -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(){
|
||||
|
@ -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;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user