mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
Working Threaded Generation
This commit is contained in:
@ -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;
|
||||
}
|
||||
|
Reference in New Issue
Block a user