some fixes to prevent deprecated warning spam on php 8.2

This commit is contained in:
GameHerobrine 2026-01-05 10:39:06 +03:00
parent 1272932257
commit 2f6e2ffcab
10 changed files with 12 additions and 7 deletions

View file

@ -71,8 +71,8 @@ class MobSpawner{
continue;
}
$x = mt_rand($player->entity->x - 32, $player->entity->x + 32);
$z = mt_rand($player->entity->z - 32, $player->entity->z + 32);
$x = mt_rand(floor($player->entity->x - 32), ceil($player->entity->x + 32));
$z = mt_rand(floor($player->entity->z - 32), ceil($player->entity->z + 32));
$diffX = $x-$player->entity->x;
$diffZ = $z-$player->entity->z;
$dist = $diffX*$diffX + $diffZ*$diffZ;