Entities despawning, half item pickup

This commit is contained in:
Shoghi Cervantes Pueyo
2013-01-04 19:36:51 +01:00
parent 8d9f9ed9ed
commit a64f0c8bbe
10 changed files with 42 additions and 16 deletions

View File

@@ -494,7 +494,7 @@ class PocketMinecraftServer extends stdClass{
$add = ' unset($this->schedule['.$this->scheduleCnt.']);';
}
$this->schedule[$this->scheduleCnt] = array($callback, $data, $eventName);
$this->action(50000 * $ticks, '$schedule = $this->schedule['.$this->scheduleCnt.'];'.$add.' call_user_func($schedule[0], $schedule[1], $schedule[2]);', (bool) $repeat);
$this->action(50000 * $ticks, '$schedule = $this->schedule['.$this->scheduleCnt.'];'.$add.'if(!is_callable($schedule[0])){unset($this->schedule['.$this->scheduleCnt.']);return;} call_user_func($schedule[0], $schedule[1], $schedule[2]);', (bool) $repeat);
return $this->scheduleCnt++;
}