Working Threaded Generation

This commit is contained in:
Shoghi Cervantes
2014-06-10 20:45:09 +02:00
parent 392eb74901
commit fa50cbf4b3
56 changed files with 1631 additions and 1733 deletions

View File

@ -26,7 +26,6 @@
namespace pocketmine\tile;
use pocketmine\level\format\Chunk;
use pocketmine\level\Level;
use pocketmine\level\Position;
use pocketmine\nbt\tag\Compound;
@ -58,11 +57,6 @@ abstract class Tile extends Position{
protected $lastUpdate;
protected $server;
public function getID(){
return $this->id;
}
public function __construct(Chunk $chunk, Compound $nbt){
$this->server = $chunk->getLevel()->getLevel()->getServer();
$this->chunk = $chunk;
@ -80,6 +74,10 @@ abstract class Tile extends Position{
$this->getLevel()->addTile($this);
}
public function getID(){
return $this->id;
}
public function saveNBT(){
$this->namedtag["x"] = $this->x;
$this->namedtag["y"] = $this->y;
@ -94,6 +92,10 @@ abstract class Tile extends Position{
Tile::$needUpdate[$this->id] = $this;
}
public function __destruct(){
$this->close();
}
public function close(){
if($this->closed === false){
$this->closed = true;
@ -103,10 +105,6 @@ abstract class Tile extends Position{
}
}
public function __destruct(){
$this->close();
}
public function getName(){
return $this->name;
}