Hello, I try to change the motion of the arrow to be faster but I have no clue on how to do it. Someone have an idea ?
PHP: public function onEntityShootBow(EntityShootBowEvent $ev): void{ $projectile = $ev->getProjectile(); if($projectile instanceof Arrow){ //pocketmine\projectile\Arrow $motion = $projectile->getMotion(); $motion->multiply(3); $projectile->setMotion($motion); }}
PHP: public function onEntityShootBow(EntityShootBowEvent $event){ $event->setForce($event->getForce() * 5);//change 5 to any multiplier you want}
have you registered your class as an event listener? if yes, add var_dump("hey"); before the defining of $projectile and tell me if it outputs "hey"