Modified Level and Chunk deprecated methods

This commit is contained in:
Shoghi Cervantes
2014-08-06 16:22:28 +02:00
parent 232bf5ebe4
commit 269a10fadd
4 changed files with 18 additions and 13 deletions

View File

@ -64,13 +64,13 @@ abstract class Tile extends Position{
public $tickTimer;
public function __construct(FullChunk $chunk, Compound $nbt){
if($chunk->getLevel() === null){
if($chunk->getProvider() === null){
throw new \Exception("Invalid garbage Chunk given to Tile");
}
$this->server = $chunk->getLevel()->getLevel()->getServer();
$this->server = $chunk->getProvider()->getLevel()->getServer();
$this->chunk = $chunk;
$this->setLevel($chunk->getLevel()->getLevel(), true); //Strong reference
$this->setLevel($chunk->getProvider()->getLevel(), true); //Strong reference
$this->namedtag = $nbt;
$this->closed = false;
$this->name = "";