Avoid implicit integer cast in Normal::pickBiome()

this throws deprecation warnings on PHP 8.1.
This commit is contained in:
Dylan K. Taylor
2022-08-20 17:16:38 +01:00
parent 98778052bb
commit c13170a00b
2 changed files with 6 additions and 0 deletions

View File

@ -123,6 +123,7 @@ class Normal extends Generator{
private function pickBiome(int $x, int $z) : Biome{
$hash = $x * 2345803 ^ $z * 9236449 ^ $this->seed;
$hash *= $hash + 223;
$hash = (int) $hash;
$xNoise = $hash >> 20 & 3;
$zNoise = $hash >> 22 & 3;
if($xNoise == 3){