mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-20 11:39:43 +00:00
MobSpawner rewrite
This commit is contained in:
parent
a75b4cc4de
commit
4835c15747
6 changed files with 98 additions and 131 deletions
|
|
@ -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;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue