mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-08 02:42:58 +00:00
convert TileFactory to singleton
This commit is contained in:
@ -534,8 +534,9 @@ class Chunk{
|
||||
if($this->NBTtiles !== null){
|
||||
$this->dirtyFlags |= self::DIRTY_FLAG_TILES;
|
||||
$world->timings->syncChunkLoadTileEntitiesTimer->startTiming();
|
||||
$tileFactory = TileFactory::getInstance();
|
||||
foreach($this->NBTtiles as $nbt){
|
||||
if(($tile = TileFactory::createFromData($world, $nbt)) !== null){
|
||||
if(($tile = $tileFactory->createFromData($world, $nbt)) !== null){
|
||||
$world->addTile($tile);
|
||||
}else{
|
||||
$world->getLogger()->warning("Chunk $this->x $this->z: Deleted unknown tile entity type " . $nbt->getString("id", "<unknown>"));
|
||||
|
Reference in New Issue
Block a user