mirror of
https://github.com/oldminecraftcommunity/NostalgiaCore.git
synced 2026-11-21 03:59:43 +00:00
no more mob pushing as it was causing a lot of memery waste, added 0.9 branch fix
This commit is contained in:
parent
a3711cfded
commit
a3fda45979
4 changed files with 3 additions and 59 deletions
|
|
@ -65,9 +65,9 @@ abstract class Living extends Entity implements Damageable, Pathfindable{
|
|||
}
|
||||
$this->ai->mobController->rotateTick();
|
||||
$this->ai->mobController->movementTick();
|
||||
if(self::$entityPushing){
|
||||
/*if(self::$entityPushing){
|
||||
$this->collideHandler();
|
||||
}
|
||||
}*/
|
||||
if($this->onGround){
|
||||
//if(!$this->hasPath() && $this->pathFinder instanceof ITileNavigator){
|
||||
// $this->path = $this->pathFinder->navigate(new PathTileXYZ($this->x, $this->y, $this->z, $this->level), new PathTileXYZ($this->x + mt_rand(-10, 10), $this->y + mt_rand(-1, 1), $this->z + mt_rand(-10, 10), $this->level), 10);
|
||||
|
|
|
|||
|
|
@ -55,7 +55,7 @@ class EntityAI
|
|||
}
|
||||
|
||||
public function updateTasks(){
|
||||
if(!($this->entity instanceof Entity)) return;
|
||||
if(!isset($this->entity) || !($this->entity instanceof Entity)) return;
|
||||
foreach($this->tasks as $t){
|
||||
if(!$t->isStarted && $t->canBeExecuted($this)){
|
||||
$t->isStarted = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue