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:
@@ -97,7 +97,7 @@ class TNT extends Opaque{
|
||||
$nbt->setShort("Fuse", $fuse);
|
||||
|
||||
/** @var PrimedTNT $tnt */
|
||||
$tnt = EntityFactory::create(PrimedTNT::class, $this->pos->getWorldNonNull(), $nbt);
|
||||
$tnt = EntityFactory::getInstance()->create(PrimedTNT::class, $this->pos->getWorldNonNull(), $nbt);
|
||||
$tnt->spawnToAll();
|
||||
}
|
||||
|
||||
|
@@ -56,7 +56,7 @@ trait FallableTrait{
|
||||
$nbt->setByte("Data", $this->getMeta());
|
||||
|
||||
/** @var FallingBlock $fall */
|
||||
$fall = EntityFactory::create(FallingBlock::class, $pos->getWorldNonNull(), $nbt);
|
||||
$fall = EntityFactory::getInstance()->create(FallingBlock::class, $pos->getWorldNonNull(), $nbt);
|
||||
$fall->spawnToAll();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user