mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 12:09:43 +00:00
some fixes to prevent deprecated warning spam on php 8.2
This commit is contained in:
parent
1272932257
commit
2f6e2ffcab
10 changed files with 12 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue