mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-05-16 02:38:54 +00:00
BiomeSelector: replace phpdoc with typehints
This commit is contained in:
parent
12e185e3f6
commit
b7690fed04
@ -68,31 +68,15 @@ abstract class BiomeSelector{
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function getTemperature(float $x, float $z) : float{
|
||||||
* @param float $x
|
|
||||||
* @param float $z
|
|
||||||
*
|
|
||||||
* @return float
|
|
||||||
*/
|
|
||||||
public function getTemperature($x, $z){
|
|
||||||
return ($this->temperature->noise2D($x, $z, true) + 1) / 2;
|
return ($this->temperature->noise2D($x, $z, true) + 1) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function getRainfall(float $x, float $z) : float{
|
||||||
* @param float $x
|
|
||||||
* @param float $z
|
|
||||||
*
|
|
||||||
* @return float
|
|
||||||
*/
|
|
||||||
public function getRainfall($x, $z){
|
|
||||||
return ($this->rainfall->noise2D($x, $z, true) + 1) / 2;
|
return ($this->rainfall->noise2D($x, $z, true) + 1) / 2;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
public function pickBiome(float $x, float $z) : Biome{
|
||||||
* @param int $x
|
|
||||||
* @param int $z
|
|
||||||
*/
|
|
||||||
public function pickBiome($x, $z) : Biome{
|
|
||||||
$temperature = (int) ($this->getTemperature($x, $z) * 63);
|
$temperature = (int) ($this->getTemperature($x, $z) * 63);
|
||||||
$rainfall = (int) ($this->getRainfall($x, $z) * 63);
|
$rainfall = (int) ($this->getRainfall($x, $z) * 63);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user