mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
better breeding, baby entities will follow their parent
This commit is contained in:
parent
eff034e897
commit
eab6573b84
10 changed files with 64 additions and 7 deletions
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue