mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-06 01:46:04 +00:00
phpdoc armageddon for master, pass 1
This commit is contained in:
@ -116,8 +116,6 @@ abstract class Projectile extends Entity{
|
||||
/**
|
||||
* Returns the base damage applied on collision. This is multiplied by the projectile's speed to give a result
|
||||
* damage.
|
||||
*
|
||||
* @return float
|
||||
*/
|
||||
public function getBaseDamage() : float{
|
||||
return $this->damage;
|
||||
@ -125,8 +123,6 @@ abstract class Projectile extends Entity{
|
||||
|
||||
/**
|
||||
* Sets the base amount of damage applied by the projectile.
|
||||
*
|
||||
* @param float $damage
|
||||
*/
|
||||
public function setBaseDamage(float $damage) : void{
|
||||
$this->damage = $damage;
|
||||
@ -134,7 +130,6 @@ abstract class Projectile extends Entity{
|
||||
|
||||
/**
|
||||
* Returns the amount of damage this projectile will deal to the entity it hits.
|
||||
* @return int
|
||||
*/
|
||||
public function getResultDamage() : int{
|
||||
return (int) ceil($this->motion->length() * $this->damage);
|
||||
@ -275,10 +270,6 @@ abstract class Projectile extends Entity{
|
||||
* This can be overridden by other projectiles to allow altering the blocks which are collided with (for example
|
||||
* some projectiles collide with any non-air block).
|
||||
*
|
||||
* @param Block $block
|
||||
* @param Vector3 $start
|
||||
* @param Vector3 $end
|
||||
*
|
||||
* @return RayTraceResult|null the result of the ray trace if successful, or null if no interception is found.
|
||||
*/
|
||||
protected function calculateInterceptWithBlock(Block $block, Vector3 $start, Vector3 $end) : ?RayTraceResult{
|
||||
@ -288,8 +279,6 @@ abstract class Projectile extends Entity{
|
||||
/**
|
||||
* Called when the projectile hits something. Override this to perform non-target-specific effects when the
|
||||
* projectile hits something.
|
||||
*
|
||||
* @param ProjectileHitEvent $event
|
||||
*/
|
||||
protected function onHit(ProjectileHitEvent $event) : void{
|
||||
|
||||
@ -297,9 +286,6 @@ abstract class Projectile extends Entity{
|
||||
|
||||
/**
|
||||
* Called when the projectile collides with an Entity.
|
||||
*
|
||||
* @param Entity $entityHit
|
||||
* @param RayTraceResult $hitResult
|
||||
*/
|
||||
protected function onHitEntity(Entity $entityHit, RayTraceResult $hitResult) : void{
|
||||
$damage = $this->getResultDamage();
|
||||
@ -327,9 +313,6 @@ abstract class Projectile extends Entity{
|
||||
|
||||
/**
|
||||
* Called when the projectile collides with a Block.
|
||||
*
|
||||
* @param Block $blockHit
|
||||
* @param RayTraceResult $hitResult
|
||||
*/
|
||||
protected function onHitBlock(Block $blockHit, RayTraceResult $hitResult) : void{
|
||||
$this->blockHit = clone $blockHit;
|
||||
|
Reference in New Issue
Block a user