mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 09:56:06 +00:00
Convert EntityFactory to singleton
This commit is contained in:
@ -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){
|
||||
|
Reference in New Issue
Block a user