MobSpawner rewrite

This commit is contained in:
GameHerobrine 2022-12-19 13:51:40 +03:00
parent a75b4cc4de
commit 4835c15747
6 changed files with 98 additions and 131 deletions

View file

@ -179,7 +179,12 @@ class Entity extends Position
$this->outOfWorld();
}
}
public function isType(){
return in_array($this->type, func_get_args());
}
public function addVelocity($vX, $vY = 0, $vZ = 0)
{
if($vX instanceof Vector3){
@ -463,12 +468,15 @@ class Entity extends Position
return $hasUpdate;
}
public function isInVoid(){
return $this->y < -1.6;
}
public function update()
{
public function update(){
if($this->closed === true){
return false;
}