PocketMine-MP  1.4 - API 1.10.0
 All Classes Namespaces Functions Variables Pages
pocketmine\entity\Projectile Class Reference
+ Inheritance diagram for pocketmine\entity\Projectile:
+ Collaboration diagram for pocketmine\entity\Projectile:

Public Member Functions

 canCollideWith (Entity $entity)
 
 getData ()
 
 saveNBT ()
 
 attack ($damage, $source=EntityDamageEvent::CAUSE_MAGIC)
 
 heal ($amount, $source=EntityRegainHealthEvent::CAUSE_MAGIC)
 
 onUpdate ($currentTick)
 
 getSaveId ()
 
 getViewers ()
 
 spawnTo (Player $player)
 
 despawnFrom (Player $player)
 
 getHealth ()
 
 setHealth ($amount)
 
 setLastDamageCause ($type)
 
 getLastDamageCause ()
 
 getMaxHealth ()
 
 setMaxHealth ($amount)
 
 entityBaseTick ($tickDiff=1)
 
 updateMovement ()
 
 getDirectionVector ()
 
 scheduleUpdate ()
 
 setOnFire ($seconds)
 
 getDirection ()
 
 extinguish ()
 
 canTriggerWalking ()
 
 getBoundingBox ()
 
 fall ($fallDistance)
 
 handleLavaMovement ()
 
 getEyeHeight ()
 
 moveFlying ()
 
 onCollideWithPlayer (Human $entityPlayer)
 
 getPosition ()
 
 getLocation ()
 
 isInsideOfWater ()
 
 isInsideOfSolid ()
 
 move ($dx, $dy, $dz)
 
 setPositionAndRotation (Vector3 $pos, $yaw, $pitch)
 
 setRotation ($yaw, $pitch)
 
 setPosition (Vector3 $pos)
 
 getMotion ()
 
 setMotion (Vector3 $motion)
 
 isOnGround ()
 
 kill ()
 
 teleport (Vector3 $pos, $yaw=null, $pitch=null)
 
 getId ()
 
 spawnToAll ()
 
 despawnFromAll ()
 
 close ()
 
 setMetadata ($metadataKey, MetadataValue $metadataValue)
 
 getMetadata ($metadataKey)
 
 hasMetadata ($metadataKey)
 
 removeMetadata ($metadataKey, Plugin $plugin)
 
 __toString ()
 
 getYaw ()
 
 getPitch ()
 
 getLevel ()
 
 setLevel (Level $level)
 
 isValid ()
 
 setStrong ()
 
 setWeak ()
 
 getSide ($side, $step=1)
 
 setComponents ($x, $y, $z)
 
 getX ()
 
 getY ()
 
 getZ ()
 
 getFloorX ()
 
 getFloorY ()
 
 getFloorZ ()
 
 getRight ()
 
 getUp ()
 
 getForward ()
 
 getSouth ()
 
 getWest ()
 
 add ($x, $y=0, $z=0)
 
 subtract ($x=0, $y=0, $z=0)
 
 multiply ($number)
 
 divide ($number)
 
 ceil ()
 
 floor ()
 
 round ()
 
 abs ()
 
 distance (Vector3 $pos)
 
 distanceSquared (Vector3 $pos)
 
 maxPlainDistance ($x=0, $z=0)
 
 length ()
 
 lengthSquared ()
 
 normalize ()
 
 dot (Vector3 $v)
 
 cross (Vector3 $v)
 
 getIntermediateWithXValue (Vector3 $v, $x)
 
 getIntermediateWithYValue (Vector3 $v, $y)
 
 getIntermediateWithZValue (Vector3 $v, $z)
 

Static Public Member Functions

static createEntity ($type, FullChunk $chunk, Compound $nbt,...$args)
 
static registerEntity ($className, $force=false)
 
static fromObject (Vector3 $pos, Level $level=null)
 
static getOppositeSide ($side)
 

Public Attributes

 $shootingEntity = null
 
const NETWORK_ID = -1
 
 $passenger = null
 
 $vehicle = null
 
 $chunkX
 
 $chunkZ
 
 $chunk
 
 $lastX = null
 
 $lastY = null
 
 $lastZ = null
 
 $motionX
 
 $motionY
 
 $motionZ
 
 $lastMotionX
 
 $lastMotionY
 
 $lastMotionZ
 
 $lastYaw
 
 $lastPitch
 
 $boundingBox
 
 $onGround
 
 $inBlock = false
 
 $positionChanged
 
 $motionChanged
 
 $dead
 
 $deadTicks = 0
 
 $height
 
 $eyeHeight = null
 
 $width
 
 $length
 
 $keepMovement = false
 
 $fallDistance
 
 $ticksLived
 
 $lastUpdate
 
 $maxFireTicks
 
 $fireTicks
 
 $airTicks
 
 $namedtag
 
 $canCollide = true
 
 $isCollided = false
 
 $isCollidedHorizontally = false
 
 $isCollidedVertically = false
 
 $noDamageTicks
 
 $closed = false
 
 $yaw
 
 $pitch
 
 $level = null
 
const SIDE_DOWN = 0
 
const SIDE_UP = 1
 
const SIDE_NORTH = 2
 
const SIDE_SOUTH = 3
 
const SIDE_WEST = 4
 
const SIDE_EAST = 5
 
 $x
 
 $y
 
 $z
 

Static Public Attributes

static $entityCount = 1
 

Protected Member Functions

 initEntity ()
 
 checkObstruction ($x, $y, $z)
 
 updateFallState ($distanceThisTick, $onGround)
 
 switchLevel (Level $targetLevel)
 
 checkBlockCollision ()
 

Protected Attributes

 $damage = 0
 
 $hasSpawned = []
 
 $id
 
 $lastDamageCause = null
 
 $age = 0
 
 $ySize = 0
 
 $stepHeight = 0
 
 $isStatic = false
 
 $fireProof
 
 $gravity
 
 $drag
 
 $server
 
 $timings
 

Detailed Description

Definition at line 35 of file Projectile.php.

Member Function Documentation

pocketmine\math\Vector3::add (   $x,
  $y = 0,
  $z = 0 
)
inherited
Parameters
Vector3 | int$x
int$y
int$z
Returns
Vector3

Definition at line 94 of file Vector3.php.

Referenced by pocketmine\math\Vector3\subtract(), and pocketmine\level\Level\useBreakOn().

+ Here is the caller graph for this function:

static pocketmine\entity\Entity::createEntity (   $type,
FullChunk  $chunk,
Compound  $nbt,
  $args 
)
staticinherited
Parameters
int | string$type
FullChunk$chunk
Compound$nbt
$args
Returns
Entity

Definition at line 239 of file Entity.php.

Referenced by pocketmine\level\Level\dropItem().

+ Here is the caller graph for this function:

pocketmine\entity\Entity::despawnFrom ( Player  $player)
inherited
Parameters
Player$player

Definition at line 350 of file Entity.php.

References pocketmine\Player\dataPacket().

+ Here is the call graph for this function:

pocketmine\entity\Entity::getDirectionVector ( )
inherited
Returns
Vector3

Definition at line 633 of file Entity.php.

Referenced by pocketmine\entity\Living\getLineOfSight().

+ Here is the caller graph for this function:

pocketmine\entity\Entity::getHealth ( )
inherited
Returns
int

Definition at line 376 of file Entity.php.

pocketmine\math\Vector3::getIntermediateWithXValue ( Vector3  $v,
  $x 
)
inherited

Returns a new vector with x value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.

Parameters
Vector3$v
float$x
Returns
Vector3

Definition at line 241 of file Vector3.php.

pocketmine\math\Vector3::getIntermediateWithYValue ( Vector3  $v,
  $y 
)
inherited

Returns a new vector with y value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.

Parameters
Vector3$v
float$y
Returns
Vector3

Definition at line 268 of file Vector3.php.

pocketmine\math\Vector3::getIntermediateWithZValue ( Vector3  $v,
  $z 
)
inherited

Returns a new vector with z value equal to the second parameter, along the line between this vector and the passed in vector, or null if not possible.

Parameters
Vector3$v
float$z
Returns
Vector3

Definition at line 295 of file Vector3.php.

pocketmine\entity\Entity::getLastDamageCause ( )
inherited
Returns
int|EntityDamageEvent|null

Definition at line 412 of file Entity.php.

pocketmine\entity\Entity::getMaxHealth ( )
inherited
Returns
int

Definition at line 419 of file Entity.php.

Referenced by pocketmine\entity\Entity\setHealth().

+ Here is the caller graph for this function:

pocketmine\entity\Entity::getMetadata (   $metadataKey)
inherited

Returns a list of previously set metadata values from the implementing object's metadata store.

Parameters
string$metadataKey
Returns
MetadataValue[]

Implements pocketmine\metadata\Metadatable.

Definition at line 1267 of file Entity.php.

pocketmine\entity\Entity::getSaveId ( )
inherited

Returns the short save name

Returns
string

Definition at line 270 of file Entity.php.

pocketmine\level\Position::getSide (   $side,
  $step = 1 
)
inherited

Returns a side Vector

Parameters
int$side
int$step
Returns
Position
Exceptions
LevelException

Definition at line 104 of file Position.php.

References pocketmine\level\Position\isValid().

+ Here is the call graph for this function:

pocketmine\entity\Entity::getViewers ( )
inherited
Returns
Player[]

Definition at line 308 of file Entity.php.

pocketmine\entity\Entity::hasMetadata (   $metadataKey)
inherited

Tests to see whether the implementing object contains the given metadata value in its metadata store.

Parameters
string$metadataKey
Returns
boolean

Implements pocketmine\metadata\Metadatable.

Definition at line 1271 of file Entity.php.

pocketmine\level\Position::isValid ( )
inherited

Checks if this object has a valid reference to a Level

Returns
bool

Definition at line 66 of file Position.php.

Referenced by pocketmine\level\Position\getSide(), and pocketmine\block\Block\getSide().

+ Here is the caller graph for this function:

pocketmine\math\Vector3::normalize ( )
inherited
Returns
Vector3

Definition at line 211 of file Vector3.php.

pocketmine\entity\Projectile::onUpdate (   $currentTick)

$entity->canCollideWith($this) or

Definition at line 79 of file Projectile.php.

References pocketmine\level\MovingObjectPosition\fromEntity(), and pocketmine\level\Position\getLevel().

+ Here is the call graph for this function:

pocketmine\entity\Entity::removeMetadata (   $metadataKey,
Plugin  $owningPlugin 
)
inherited

Removes the given metadata value from the implementing object's metadata store.

Parameters
string$metadataKey
Plugin$owningPlugin
Returns
void

Implements pocketmine\metadata\Metadatable.

Definition at line 1275 of file Entity.php.

pocketmine\level\Position::setComponents (   $x,
  $y,
  $z 
)
inherited
Parameters
$x
$y
$z
Returns
Position

Definition at line 123 of file Position.php.

pocketmine\entity\Entity::setHealth (   $amount)
inherited

Sets the health of the Entity. This won't send any update to the players

Parameters
int$amount

Definition at line 385 of file Entity.php.

References pocketmine\entity\Entity\getMaxHealth().

+ Here is the call graph for this function:

pocketmine\entity\Entity::setLastDamageCause (   $type)
inherited
Parameters
int | EntityDamageEvent$type

Definition at line 405 of file Entity.php.

pocketmine\entity\Entity::setMaxHealth (   $amount)
inherited
Parameters
int$amount

Definition at line 426 of file Entity.php.

pocketmine\entity\Entity::setMetadata (   $metadataKey,
MetadataValue  $newMetadataValue 
)
inherited

Sets a metadata value in the implementing object's metadata store.

Parameters
string$metadataKey
MetadataValue$newMetadataValue
Returns
void

Implements pocketmine\metadata\Metadatable.

Definition at line 1263 of file Entity.php.

pocketmine\level\Position::setStrong ( )
inherited

Marks the level reference as strong so it won't be collected by the garbage collector.

Deprecated:
Returns
bool

Definition at line 78 of file Position.php.

pocketmine\level\Position::setWeak ( )
inherited

Marks the level reference as weak so it won't have effect against the garbage collector decision.

Deprecated:
Returns
bool

Definition at line 90 of file Position.php.

pocketmine\entity\Entity::spawnTo ( Player  $player)
inherited
Parameters
Player$player

Definition at line 315 of file Entity.php.

References pocketmine\level\Level\chunkHash().

+ Here is the call graph for this function:

pocketmine\math\Vector3::subtract (   $x = 0,
  $y = 0,
  $z = 0 
)
inherited
Parameters
Vector3 | int$x
int$y
int$z
Returns
Vector3

Definition at line 109 of file Vector3.php.

References pocketmine\math\Vector3\add().

+ Here is the call graph for this function:

pocketmine\entity\Entity::teleport ( Vector3  $pos,
  $yaw = null,
  $pitch = null 
)
inherited
Parameters
Vector3 | Position | Location$pos
float$yaw
float$pitch
Returns
bool

Definition at line 1188 of file Entity.php.


The documentation for this class was generated from the following file: