mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-10-18 04:00:29 +00:00
Merge branch 'next-minor'
This commit is contained in:
@@ -63,7 +63,7 @@ class Bow extends Tool{
|
||||
$baseForce = min((($p ** 2) + $p * 2) / 3, 1);
|
||||
|
||||
/** @var ArrowEntity $entity */
|
||||
$entity = EntityFactory::getInstance()->create(ArrowEntity::class, $location->getWorld(), $nbt, $player, $baseForce >= 1);
|
||||
$entity = EntityFactory::getInstance()->create(ArrowEntity::class, $location->getWorldNonNull(), $nbt, $player, $baseForce >= 1);
|
||||
|
||||
$infinity = $this->hasEnchantment(Enchantment::INFINITY());
|
||||
if($infinity){
|
||||
|
@@ -60,7 +60,7 @@ abstract class ProjectileItem extends Item{
|
||||
Utils::testValidInstance($class, Throwable::class);
|
||||
|
||||
/** @var Throwable $projectile */
|
||||
$projectile = EntityFactory::getInstance()->create($class, $location->getWorld(), $nbt, $player);
|
||||
$projectile = EntityFactory::getInstance()->create($class, $location->getWorldNonNull(), $nbt, $player);
|
||||
$projectile->setMotion($projectile->getMotion()->multiply($this->getThrowForce()));
|
||||
|
||||
$projectileEv = new ProjectileLaunchEvent($projectile);
|
||||
|
Reference in New Issue
Block a user