mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 19:49:44 +00:00
more entity optimizations
This commit is contained in:
parent
2b0ad36e14
commit
2d9b37aa9c
12 changed files with 44 additions and 62 deletions
|
|
@ -60,9 +60,9 @@ abstract class Animal extends Creature implements Ageable, Breedable{
|
|||
public function spawnChild()
|
||||
{
|
||||
return $this->server->api->entity->add($this->level, $this->class, $this->type, [
|
||||
"x" => $this->x + Utils::randomFloat() * mt_rand(-1, 1),
|
||||
"x" => $this->x + lcg_value() * mt_rand(-1, 1),
|
||||
"y" => $this->y,
|
||||
"z" => $this->z + Utils::randomFloat() * mt_rand(-1, 1),
|
||||
"z" => $this->z + lcg_value() * mt_rand(-1, 1),
|
||||
"IsBaby" => true,
|
||||
"Age" => -24000,
|
||||
]);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue