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

@ -64,7 +64,7 @@ class Bow extends Tool{
$baseForce = min((($p ** 2) + $p * 2) / 3, 1);
/** @var ArrowEntity $entity */
$entity = EntityFactory::create(ArrowEntity::class, $location->getWorld(), $nbt, $player, $baseForce >= 1);
$entity = EntityFactory::getInstance()->create(ArrowEntity::class, $location->getWorld(), $nbt, $player, $baseForce >= 1);
$infinity = $this->hasEnchantment(Enchantment::INFINITY());
if($infinity){