mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-19 04:15:04 +00:00
Convert EntityFactory to singleton
This commit is contained in:
@@ -507,9 +507,10 @@ class Chunk{
|
||||
if($this->NBTentities !== null){
|
||||
$this->dirtyFlags |= self::DIRTY_FLAG_ENTITIES;
|
||||
$world->timings->syncChunkLoadEntitiesTimer->startTiming();
|
||||
$entityFactory = EntityFactory::getInstance();
|
||||
foreach($this->NBTentities as $nbt){
|
||||
try{
|
||||
$entity = EntityFactory::createFromData($world, $nbt);
|
||||
$entity = $entityFactory->createFromData($world, $nbt);
|
||||
if(!($entity instanceof Entity)){
|
||||
$saveIdTag = $nbt->getTag("id") ?? $nbt->getTag("identifier");
|
||||
$saveId = "<unknown>";
|
||||
|
Reference in New Issue
Block a user