Convert EntityFactory to singleton

This commit is contained in:
Dylan K. Taylor
2020-04-24 22:43:02 +01:00
parent a75241ef03
commit 7d9df6af6f
12 changed files with 54 additions and 59 deletions

View File

@@ -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();
}

View File

@@ -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();
}
}