Added individual object timings to Entities / Tile Entities

This commit is contained in:
Shoghi Cervantes
2014-09-30 16:09:21 +02:00
parent f8378c09ba
commit 539fa232f8
8 changed files with 167 additions and 121 deletions

View File

@ -54,6 +54,7 @@ abstract class Tile extends Position{
public $namedtag;
protected $lastUpdate;
protected $server;
protected $timings;
/** @var \pocketmine\event\TimingsHandler */
public $tickTimer;
@ -63,6 +64,8 @@ abstract class Tile extends Position{
throw new \Exception("Invalid garbage Chunk given to Tile");
}
$this->timings = Timings::getTileEntityTimings($this);
$this->server = $chunk->getProvider()->getLevel()->getServer();
$this->chunk = $chunk;
$this->setLevel($chunk->getProvider()->getLevel());