mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-05 17:36:12 +00:00
TileFactory now only manages loading tiles from NBT, not direct creation
my objective is to make this use proper constructors like entities, but there's a couple of obstacles to get around first.
This commit is contained in:
@ -163,7 +163,12 @@ class Block{
|
||||
}
|
||||
}
|
||||
if($oldTile === null and $tileType !== null){
|
||||
$this->pos->getWorldNonNull()->addTile(TileFactory::getInstance()->create($tileType, $this->pos->getWorldNonNull(), $this->pos->asVector3()));
|
||||
/**
|
||||
* @var Tile $tile
|
||||
* @see Tile::__construct()
|
||||
*/
|
||||
$tile = new $tileType($this->pos->getWorldNonNull(), $this->pos->asVector3());
|
||||
$this->pos->getWorldNonNull()->addTile($tile);
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user