better breeding, baby entities will follow their parent

This commit is contained in:
GameHerobrine 2024-03-12 06:50:01 +03:00
parent eff034e897
commit eab6573b84
10 changed files with 64 additions and 7 deletions

View file

@ -132,7 +132,7 @@ class Vector3{
}
public function distanceSquared($x = 0, $y = 0, $z = 0){
if(($x instanceof Vector3) === true){
if($x instanceof Vector3){
return $this->distanceSquared($x->x, $x->y, $x->z);
}else{
return ($this->x - $x)*($this->x - $x) + ($this->y - $y)*($this->y - $y) + ($this->z - $z)*($this->z - $z);