PocketMine-MP 5.21.2 git-b2aa6396c3cc2cafdd815eacc360e1ad89599899
Loading...
Searching...
No Matches
pocketmine\entity\Human Class Reference
+ Inheritance diagram for pocketmine\entity\Human:
+ Collaboration diagram for pocketmine\entity\Human:

Public Member Functions

 __construct (Location $location, Skin $skin, ?CompoundTag $nbt=null)
 
 __toString ()
 
 addMotion (float $x, float $y, float $z)
 
 applyDamageModifiers (EntityDamageEvent $source)
 
 attack (EntityDamageEvent $source)
 
 broadcastAnimation (Animation $animation, ?array $targets=null)
 
 broadcastSound (Sound $sound, ?array $targets=null)
 
 canBeCollidedWith ()
 
 canBeMovedByCurrents ()
 
 canBeRenamed ()
 
 canBreathe ()
 
 canClimb ()
 
 canClimbWalls ()
 
 canCollideWith (Entity $entity)
 
 canSaveWithChunk ()
 
 close ()
 
 consumeObject (Consumable $consumable)
 
 damageArmor (float $damage)
 
 despawnFrom (Player $player, bool $send=true)
 
 despawnFromAll ()
 
 emote (string $emoteId)
 
 extinguish ()
 
 flagForDespawn ()
 
 getAbsorption ()
 
 getAirSupplyTicks ()
 
 getArmorInventory ()
 
 getArmorPoints ()
 
 getAttributeMap ()
 
 getBoundingBox ()
 
 getDirectionPlane ()
 
 getDirectionVector ()
 
 getDisplayName ()
 
 getDrops ()
 
 getEffects ()
 
 getEnchantmentSeed ()
 
 getEnderInventory ()
 
 getEyeHeight ()
 
 getEyePos ()
 
 getFallDistance ()
 
 getFireTicks ()
 
 getGravity ()
 
 getHealth ()
 
 getHighestArmorEnchantmentLevel (Enchantment $enchantment)
 
 getHorizontalFacing ()
 
 getHungerManager ()
 
 getId ()
 
 getInventory ()
 
 getJumpVelocity ()
 
 getLastDamageCause ()
 
 getLineOfSight (int $maxDistance, int $maxLength=0, array $transparent=[])
 
 getLocation ()
 
 getMaxAirSupplyTicks ()
 
 getMaxHealth ()
 
 getMotion ()
 
 getMovementSpeed ()
 
 getName ()
 
 getNameTag ()
 
 getNetworkProperties ()
 
 getOffHandInventory ()
 
 getOffsetPosition (Vector3 $vector3)
 
 getOwningEntity ()
 
 getOwningEntityId ()
 
 getPosition ()
 
 getScale ()
 
 getScoreTag ()
 
 getSize ()
 
 getSkin ()
 
 getTargetBlock (int $maxDistance, array $transparent=[])
 
 getTargetEntity ()
 
 getTargetEntityId ()
 
 getUniqueId ()
 
 getViewers ()
 
 getWorld ()
 
 getXpDropAmount ()
 
 getXpManager ()
 
 hasGravity ()
 
 hasMovementUpdate ()
 
 hasNoClientPredictions ()
 
 heal (EntityRegainHealthEvent $source)
 
 isAlive ()
 
 isBreathing ()
 
 isClosed ()
 
 isFireProof ()
 
 isFlaggedForDespawn ()
 
 isGliding ()
 
 isInsideOfSolid ()
 
 isInvisible ()
 
 isNameTagAlwaysVisible ()
 
 isNameTagVisible ()
 
 isOnFire ()
 
 isOnGround ()
 
 isSilent ()
 
 isSneaking ()
 
 isSprinting ()
 
 isSwimming ()
 
 isUnderwater ()
 
 jump ()
 
 kill ()
 
 knockBack (float $x, float $z, float $force=self::DEFAULT_KNOCKBACK_FORCE, ?float $verticalLimit=self::DEFAULT_KNOCKBACK_VERTICAL_LIMIT)
 
 lookAt (Vector3 $target)
 
 onAirExpired ()
 
 onCollideWithPlayer (Player $player)
 
 onInteract (Player $player, Vector3 $clickPos)
 
 onNearbyBlockChange ()
 
 onRandomUpdate ()
 
 onUpdate (int $currentTick)
 
 regenerateEnchantmentSeed ()
 
 resetFallDistance ()
 
 respawnToAll ()
 
 saveNBT ()
 
 scheduleUpdate ()
 
 sendData (?array $targets, ?array $data=null)
 
 sendSkin (?array $targets=null)
 
 setAbsorption (float $absorption)
 
 setAirSupplyTicks (int $ticks)
 
 setBreathing (bool $value=true)
 
 setCanClimb (bool $value=true)
 
 setCanClimbWalls (bool $value=true)
 
 setCanSaveWithChunk (bool $value)
 
 setEnchantmentSeed (int $seed)
 
 setFallDistance (float $fallDistance)
 
 setFireTicks (int $fireTicks)
 
 setForceMovementUpdate (bool $value=true)
 
 setGliding (bool $value=true)
 
 setGravity (float $gravity)
 
 setHasGravity (bool $v=true)
 
 setHealth (float $amount)
 
 setInvisible (bool $value=true)
 
 setLastDamageCause (EntityDamageEvent $type)
 
 setMaxAirSupplyTicks (int $ticks)
 
 setMaxHealth (int $amount)
 
 setMotion (Vector3 $motion)
 
 setMovementSpeed (float $v, bool $fit=false)
 
 setNameTag (string $name)
 
 setNameTagAlwaysVisible (bool $value=true)
 
 setNameTagVisible (bool $value=true)
 
 setNoClientPredictions (bool $value=true)
 
 setOnFire (int $seconds)
 
 setOwningEntity (?Entity $owner)
 
 setRotation (float $yaw, float $pitch)
 
 setScale (float $value)
 
 setScoreTag (string $score)
 
 setSilent (bool $value=true)
 
 setSkin (Skin $skin)
 
 setSneaking (bool $value=true)
 
 setSprinting (bool $value=true)
 
 setSwimming (bool $value=true)
 
 setTargetEntity (?Entity $target)
 
 spawnTo (Player $player)
 
 spawnToAll ()
 
 teleport (Vector3 $pos, ?float $yaw=null, ?float $pitch=null)
 

Static Public Member Functions

static getNetworkTypeId ()
 
static nextRuntimeId ()
 
static parseSkinNBT (CompoundTag $nbt)
 

Public Attributes

AxisAlignedBB $boundingBox
 
int $deadTicks = 0
 
float $fallDistance = 0.0
 
bool $isCollided = false
 
bool $isCollidedHorizontally = false
 
bool $isCollidedVertically = false
 
bool $keepMovement = false
 
int $lastUpdate
 
int $noDamageTicks = 0
 
bool $onGround = false
 
EntitySizeInfo $size
 
int $ticksLived = 0
 
const DEFAULT_KNOCKBACK_FORCE = 0.4
 
const DEFAULT_KNOCKBACK_VERTICAL_LIMIT = 0.4
 
const MOTION_THRESHOLD = 0.00001
 
const TAG_MOTION = "Motion"
 
const TAG_POS = "Pos"
 
const TAG_ROTATION = "Rotation"
 

Protected Member Functions

 addAttributes ()
 
 applyConsumptionResults (Consumable $consumable)
 
 applyDragBeforeGravity ()
 
 applyPostDamageEffects (EntityDamageEvent $source)
 
 broadcastMotion ()
 
 broadcastMovement (bool $teleport=false)
 
 calculateFallDamage (float $fallDistance)
 
 checkBlockIntersections ()
 
 checkGroundState (float $wantedX, float $wantedY, float $wantedZ, float $dx, float $dy, float $dz)
 
 checkObstruction (float $x, float $y, float $z)
 
 dealFireDamage ()
 
 destroyCycles ()
 
 doAirSupplyTick (int $tickDiff)
 
 doHitAnimation ()
 
 doOnFireTick (int $tickDiff=1)
 
 endDeathAnimation ()
 
 entityBaseTick (int $tickDiff=1)
 
 getAllNetworkData ()
 
 getBlocksAroundWithEntityInsideActions ()
 
 getBlocksIntersected (float $inset)
 
 getDirtyNetworkData ()
 
 getInitialDragMultiplier ()
 
 getInitialGravity ()
 
 getInitialSizeInfo ()
 
 initEntity (CompoundTag $nbt)
 
 initHumanData (CompoundTag $nbt)
 
 move (float $dx, float $dy, float $dz)
 
 onDeath ()
 
 onDeathUpdate (int $tickDiff)
 
 onDispose ()
 
 onFirstUpdate (int $currentTick)
 
 onHitGround ()
 
 recalculateBoundingBox ()
 
 resetLastMovements ()
 
 sendSpawnPacket (Player $player)
 
 setPosition (Vector3 $pos)
 
 setPositionAndRotation (Vector3 $pos, float $yaw, float $pitch)
 
 setSize (EntitySizeInfo $size)
 
 startDeathAnimation ()
 
 syncNetworkData (EntityMetadataCollection $properties)
 
 tryChangeMovement ()
 
 updateFallState (float $distanceThisTick, bool $onGround)
 
 updateMovement (bool $teleport=false)
 

Protected Attributes

Attribute $absorptionAttr
 
bool $alwaysShowNameTag = false
 
ArmorInventory $armorInventory
 
int $attackTime = 0
 
AttributeMap $attributeMap
 
array $blocksAround = null
 
bool $breathing = true
 
int $breathTicks = self::DEFAULT_BREATH_TICKS
 
bool $canClimb = false
 
bool $canClimbWalls = false
 
bool $closed = false
 
float $drag
 
EffectManager $effectManager
 
PlayerEnderInventory $enderInventory
 
int $fireTicks = 0
 
bool $forceMovementUpdate = false
 
bool $gliding = false
 
float $gravity
 
bool $gravityEnabled = true
 
array $hasSpawned = []
 
Attribute $healthAttr
 
HungerManager $hungerManager
 
int $id
 
PlayerInventory $inventory
 
bool $invisible = false
 
float $jumpVelocity = 0.42
 
bool $justCreated = true
 
Attribute $knockbackResistanceAttr
 
EntityDamageEvent $lastDamageCause = null
 
Location $lastLocation
 
Vector3 $lastMotion
 
Location $location
 
int $maxBreathTicks = self::DEFAULT_BREATH_TICKS
 
int $maxDeadTicks = 25
 
Vector3 $motion
 
Attribute $moveSpeedAttr
 
string $nameTag = ""
 
bool $nameTagVisible = true
 
bool $networkPropertiesDirty = false
 
bool $noClientPredictions = false
 
PlayerOffHandInventory $offHandInventory
 
int $ownerId = null
 
float $scale = 1.0
 
string $scoreTag = ""
 
Server $server
 
bool $silent = false
 
Skin $skin
 
bool $sneaking = false
 
bool $sprinting = false
 
float $stepHeight = 0.0
 
bool $swimming = false
 
int $targetId = null
 
TimingsHandler $timings
 
UuidInterface $uuid
 
ExperienceManager $xpManager
 
int $xpSeed
 
float $ySize = 0.0
 
const DEFAULT_BREATH_TICKS = 300
 
const STEP_CLIP_MULTIPLIER = 0.4
 

Detailed Description

Definition at line 80 of file Human.php.

Constructor & Destructor Documentation

◆ __construct()

pocketmine\entity\Human::__construct ( Location $location,
Skin $skin,
?CompoundTag $nbt = null )

Definition at line 116 of file Human.php.

Member Function Documentation

◆ __toString()

pocketmine\entity\Entity::__toString ( )
inherited

Definition at line 1705 of file Entity.php.

◆ addAttributes()

pocketmine\entity\Living::addAttributes ( )
protectedinherited

Reimplemented from pocketmine\entity\Entity.

Definition at line 189 of file Living.php.

◆ addMotion()

pocketmine\entity\Entity::addMotion ( float $x,
float $y,
float $z )
inherited

Adds the given values to the entity's motion vector.

Definition at line 1423 of file Entity.php.

Referenced by pocketmine\entity\effect\LevitationEffect\applyEffect().

+ Here is the caller graph for this function:

◆ applyConsumptionResults()

pocketmine\entity\Human::applyConsumptionResults ( Consumable $consumable)
protected

Applies effects from consuming the object. This shouldn't do any can-consume checks (those are expected to be handled by the caller).

Reimplemented from pocketmine\entity\Living.

Definition at line 200 of file Human.php.

◆ applyDamageModifiers()

pocketmine\entity\Human::applyDamageModifiers ( EntityDamageEvent $source)

Called prior to EntityDamageEvent execution to apply modifications to the event's damage, such as reduction due to effects or armour.

Reimplemented from pocketmine\entity\Living.

Definition at line 365 of file Human.php.

◆ applyDragBeforeGravity()

pocketmine\entity\Entity::applyDragBeforeGravity ( )
protectedinherited

Definition at line 823 of file Entity.php.

◆ applyPostDamageEffects()

pocketmine\entity\Human::applyPostDamageEffects ( EntityDamageEvent $source)
protected

Called after EntityDamageEvent execution to apply post-hurt effects, such as reducing absorption or modifying armour durability. This will not be called by damage sources causing death.

Reimplemented from pocketmine\entity\Living.

Reimplemented in pocketmine\player\Player.

Definition at line 379 of file Human.php.

◆ attack()

pocketmine\entity\Living::attack ( EntityDamageEvent $source)
inherited

Reimplemented from pocketmine\entity\Entity.

Definition at line 526 of file Living.php.

◆ broadcastAnimation()

pocketmine\entity\Entity::broadcastAnimation ( Animation $animation,
?array $targets = null )
inherited
Parameters
Player[] | null$targets

Reimplemented in pocketmine\player\Player.

Definition at line 1687 of file Entity.php.

◆ broadcastMotion()

pocketmine\entity\Entity::broadcastMotion ( )
protectedinherited

Definition at line 802 of file Entity.php.

◆ broadcastMovement()

pocketmine\entity\Entity::broadcastMovement ( bool $teleport = false)
protectedinherited

Definition at line 784 of file Entity.php.

◆ broadcastSound()

pocketmine\entity\Entity::broadcastSound ( Sound $sound,
?array $targets = null )
inherited

Broadcasts a sound caused by the entity. If the entity is considered "silent", the sound will be dropped.

Parameters
Player[] | null$targets

Reimplemented in pocketmine\player\Player.

Definition at line 1695 of file Entity.php.

◆ calculateFallDamage()

pocketmine\entity\Living::calculateFallDamage ( float $fallDistance)
protectedinherited

Definition at line 361 of file Living.php.

◆ canBeCollidedWith()

pocketmine\entity\Entity::canBeCollidedWith ( )
inherited

Definition at line 750 of file Entity.php.

◆ canBeMovedByCurrents()

pocketmine\entity\Entity::canBeMovedByCurrents ( )
inherited

Returns whether this entity can be moved by currents in liquids.

Reimplemented in pocketmine\entity\object\FallingBlock, and pocketmine\player\Player.

Definition at line 1304 of file Entity.php.

◆ canBeRenamed()

pocketmine\entity\Living::canBeRenamed ( )
inherited

Returns whether players can rename this entity using a name tag. Note that plugins can still name entities using setNameTag().

Reimplemented from pocketmine\entity\Entity.

Reimplemented in pocketmine\player\Player.

Definition at line 137 of file Living.php.

◆ canBreathe()

pocketmine\entity\Living::canBreathe ( )
inherited

Returns whether the entity can currently breathe.

Reimplemented in pocketmine\entity\WaterAnimal, and pocketmine\player\Player.

Definition at line 728 of file Living.php.

◆ canClimb()

pocketmine\entity\Entity::canClimb ( )
inherited

Returns whether the entity is able to climb blocks such as ladders or vines.

Definition at line 368 of file Entity.php.

◆ canClimbWalls()

pocketmine\entity\Entity::canClimbWalls ( )
inherited

Returns whether this entity is climbing a block. By default this is only true if the entity is climbing a ladder or vine or similar block.

Definition at line 383 of file Entity.php.

◆ canCollideWith()

pocketmine\entity\Entity::canCollideWith ( Entity $entity)
inherited

Definition at line 746 of file Entity.php.

◆ canSaveWithChunk()

pocketmine\entity\Entity::canSaveWithChunk ( )
inherited

Returns whether this entity will be saved when its chunk is unloaded.

Reimplemented in pocketmine\entity\object\ItemEntity, and pocketmine\player\Player.

Definition at line 459 of file Entity.php.

◆ checkBlockIntersections()

pocketmine\entity\Entity::checkBlockIntersections ( )
protectedinherited

Definition at line 1308 of file Entity.php.

◆ checkGroundState()

pocketmine\entity\Entity::checkGroundState ( float $wantedX,
float $wantedY,
float $wantedZ,
float $dx,
float $dy,
float $dz )
protectedinherited

Definition at line 1252 of file Entity.php.

◆ checkObstruction()

pocketmine\entity\Entity::checkObstruction ( float $x,
float $y,
float $z )
protectedinherited

Definition at line 851 of file Entity.php.

◆ close()

pocketmine\entity\Entity::close ( )
finalinherited

Closes the entity and frees attached references.

WARNING: Entities are unusable after this has been executed!

Definition at line 1587 of file Entity.php.

◆ consumeObject()

pocketmine\entity\Human::consumeObject ( Consumable $consumable)

Causes the mob to consume the given Consumable object, applying applicable effects, health bonuses, food bonuses, etc.

Reimplemented from pocketmine\entity\Living.

Definition at line 192 of file Human.php.

◆ damageArmor()

pocketmine\entity\Living::damageArmor ( float $damage)
inherited

Damages the worn armour according to the amount of damage given. Each 4 points (rounded down) deals 1 damage point to each armour piece, but never less than 1 total.

Definition at line 504 of file Living.php.

◆ dealFireDamage()

pocketmine\entity\Entity::dealFireDamage ( )
protectedinherited

Called to deal damage to entities when they are on fire.

Definition at line 741 of file Entity.php.

◆ despawnFrom()

pocketmine\entity\Entity::despawnFrom ( Player $player,
bool $send = true )
inherited
Deprecated
WARNING: This function DOES NOT permanently hide the entity from the player. As soon as the entity or player moves, the player will once again be able to see the entity.

Definition at line 1541 of file Entity.php.

◆ despawnFromAll()

pocketmine\entity\Entity::despawnFromAll ( )
inherited
Deprecated
WARNING: This function DOES NOT permanently hide the entity from viewers. As soon as the entity or player moves, viewers will once again be able to see the entity.

Definition at line 1555 of file Entity.php.

◆ destroyCycles()

pocketmine\entity\Human::destroyCycles ( )
protected

Called when the entity is disposed, after all events have been fired. This should be used to perform destructive circular object references and things which could impact memory usage.

It is expected that the object is unusable after this is called.

Reimplemented from pocketmine\entity\Living.

Reimplemented in pocketmine\player\Player.

Definition at line 539 of file Human.php.

◆ doAirSupplyTick()

pocketmine\entity\Living::doAirSupplyTick ( int $tickDiff)
protectedinherited

Ticks the entity's air supply, consuming it when underwater and regenerating it when out of water.

Definition at line 693 of file Living.php.

◆ doHitAnimation()

pocketmine\entity\Living::doHitAnimation ( )
protectedinherited

Definition at line 590 of file Living.php.

◆ doOnFireTick()

pocketmine\entity\Entity::doOnFireTick ( int $tickDiff = 1)
protectedinherited

Definition at line 717 of file Entity.php.

◆ emote()

pocketmine\entity\Human::emote ( string $emoteId)

Definition at line 181 of file Human.php.

◆ endDeathAnimation()

pocketmine\entity\Living::endDeathAnimation ( )
protectedinherited

Definition at line 646 of file Living.php.

◆ entityBaseTick()

pocketmine\entity\Human::entityBaseTick ( int $tickDiff = 1)
protected

Reimplemented from pocketmine\entity\Living.

Definition at line 352 of file Human.php.

◆ extinguish()

pocketmine\entity\Entity::extinguish ( )
inherited

Definition at line 708 of file Entity.php.

◆ flagForDespawn()

pocketmine\entity\Entity::flagForDespawn ( )
inherited

Flags the entity to be removed from the world on the next tick.

Definition at line 1566 of file Entity.php.

◆ getAbsorption()

pocketmine\entity\Living::getAbsorption ( )
inherited

Definition at line 222 of file Living.php.

◆ getAirSupplyTicks()

pocketmine\entity\Living::getAirSupplyTicks ( )
inherited

Returns the number of ticks remaining in the entity's air supply. Note that the entity may survive longer than this amount of time without damage due to enchantments such as Respiration.

Definition at line 752 of file Living.php.

◆ getAllNetworkData()

pocketmine\entity\Entity::getAllNetworkData ( )
finalprotectedinherited
Returns
MetadataProperty[] @phpstan-return array<int, MetadataProperty>

Definition at line 1653 of file Entity.php.

◆ getArmorInventory()

pocketmine\entity\Living::getArmorInventory ( )
inherited

Definition at line 415 of file Living.php.

◆ getArmorPoints()

pocketmine\entity\Living::getArmorPoints ( )
inherited

Returns how many armour points this mob has. Armour points provide a percentage reduction to damage. For mobs which can wear armour, this should return the sum total of the armour points provided by their equipment.

Definition at line 394 of file Living.php.

◆ getAttributeMap()

pocketmine\entity\Entity::getAttributeMap ( )
inherited

Definition at line 626 of file Entity.php.

◆ getBlocksAroundWithEntityInsideActions()

pocketmine\entity\Entity::getBlocksAroundWithEntityInsideActions ( )
protectedinherited
Returns
Block[]

Definition at line 1286 of file Entity.php.

◆ getBlocksIntersected()

pocketmine\entity\Entity::getBlocksIntersected ( float $inset)
protectedinherited

Yields all the blocks whose full-cube areas are intersected by the entity's AABB.

@phpstan-return \Generator<int, Block, void, void>

Definition at line 1264 of file Entity.php.

◆ getBoundingBox()

pocketmine\entity\Entity::getBoundingBox ( )
inherited

Definition at line 299 of file Entity.php.

◆ getDirectionPlane()

pocketmine\entity\Entity::getDirectionPlane ( )
inherited

Definition at line 953 of file Entity.php.

◆ getDirectionVector()

pocketmine\entity\Entity::getDirectionVector ( )
inherited

Definition at line 944 of file Entity.php.

◆ getDirtyNetworkData()

pocketmine\entity\Entity::getDirtyNetworkData ( )
finalprotectedinherited
Returns
MetadataProperty[] @phpstan-return array<int, MetadataProperty>

Definition at line 1641 of file Entity.php.

◆ getDisplayName()

pocketmine\entity\Living::getDisplayName ( )
inherited

Returns the name used to describe this entity in chat and command outputs.

Reimplemented in pocketmine\player\Player.

Definition at line 201 of file Living.php.

◆ getDrops()

pocketmine\entity\Human::getDrops ( )
Returns
Item[]

Reimplemented from pocketmine\entity\Living.

Reimplemented in pocketmine\player\Player.

Definition at line 403 of file Human.php.

◆ getEffects()

pocketmine\entity\Living::getEffects ( )
inherited

Definition at line 317 of file Living.php.

◆ getEnchantmentSeed()

pocketmine\entity\Human::getEnchantmentSeed ( )

Definition at line 213 of file Human.php.

◆ getEnderInventory()

pocketmine\entity\Human::getEnderInventory ( )

Definition at line 237 of file Human.php.

◆ getEyeHeight()

pocketmine\entity\Entity::getEyeHeight ( )
inherited

Definition at line 1100 of file Entity.php.

◆ getEyePos()

pocketmine\entity\Entity::getEyePos ( )
inherited

Definition at line 1104 of file Entity.php.

◆ getFallDistance()

pocketmine\entity\Entity::getFallDistance ( )
inherited

Definition at line 1065 of file Entity.php.

◆ getFireTicks()

pocketmine\entity\Entity::getFireTicks ( )
inherited

Definition at line 691 of file Entity.php.

◆ getGravity()

pocketmine\entity\Entity::getGravity ( )
inherited

Definition at line 806 of file Entity.php.

◆ getHealth()

pocketmine\entity\Entity::getHealth ( )
inherited

Definition at line 583 of file Entity.php.

◆ getHighestArmorEnchantmentLevel()

pocketmine\entity\Living::getHighestArmorEnchantmentLevel ( Enchantment $enchantment)
inherited

Returns the highest level of the specified enchantment on any armour piece that the entity is currently wearing.

Definition at line 406 of file Living.php.

◆ getHorizontalFacing()

pocketmine\entity\Entity::getHorizontalFacing ( )
inherited

Definition at line 925 of file Entity.php.

◆ getHungerManager()

pocketmine\entity\Human::getHungerManager ( )

Definition at line 188 of file Human.php.

◆ getId()

pocketmine\entity\Entity::getId ( )
inherited

Definition at line 1473 of file Entity.php.

◆ getInitialDragMultiplier()

pocketmine\entity\Living::getInitialDragMultiplier ( )
protectedinherited

Returns the percentage by which the entity's velocity is reduced per tick when moving through air. The entity's velocity is multiplied by 1 minus this value.

Returns
float 0-1

Reimplemented from pocketmine\entity\Entity.

Definition at line 131 of file Living.php.

◆ getInitialGravity()

pocketmine\entity\Living::getInitialGravity ( )
protectedinherited

Returns the downwards acceleration of the entity when falling, in blocks/tick².

Returns
float minimum 0

Reimplemented from pocketmine\entity\Entity.

Definition at line 133 of file Living.php.

◆ getInitialSizeInfo()

pocketmine\entity\Human::getInitialSizeInfo ( )
protected

Reimplemented from pocketmine\entity\Entity.

Definition at line 121 of file Human.php.

◆ getInventory()

pocketmine\entity\Human::getInventory ( )

Implements pocketmine\inventory\InventoryHolder.

Definition at line 231 of file Human.php.

◆ getJumpVelocity()

pocketmine\entity\Living::getJumpVelocity ( )
inherited

Returns the initial upwards velocity of a jumping entity in blocks/tick, including additional velocity due to effects.

Definition at line 348 of file Living.php.

◆ getLastDamageCause()

pocketmine\entity\Entity::getLastDamageCause ( )
inherited

Definition at line 622 of file Entity.php.

◆ getLineOfSight()

pocketmine\entity\Living::getLineOfSight ( int $maxDistance,
int $maxLength = 0,
array $transparent = [] )
inherited
Parameters
true[]$transparent@phpstan-param array<int, true> $transparent
Returns
Block[]

Definition at line 808 of file Living.php.

◆ getLocation()

pocketmine\entity\Entity::getLocation ( )
inherited

Definition at line 1334 of file Entity.php.

◆ getMaxAirSupplyTicks()

pocketmine\entity\Living::getMaxAirSupplyTicks ( )
inherited

Returns the maximum amount of air ticks the entity's air supply can contain.

Definition at line 767 of file Living.php.

◆ getMaxHealth()

pocketmine\entity\Living::getMaxHealth ( )
inherited

Reimplemented from pocketmine\entity\Entity.

Definition at line 214 of file Living.php.

◆ getMotion()

pocketmine\entity\Entity::getMotion ( )
inherited

Definition at line 1397 of file Entity.php.

◆ getMovementSpeed()

pocketmine\entity\Living::getMovementSpeed ( )
inherited

Definition at line 286 of file Living.php.

◆ getName()

pocketmine\entity\Human::getName ( )

Reimplemented from pocketmine\entity\Living.

Reimplemented in pocketmine\player\Player.

Definition at line 361 of file Human.php.

◆ getNameTag()

pocketmine\entity\Entity::getNameTag ( )
inherited

Definition at line 243 of file Entity.php.

◆ getNetworkProperties()

pocketmine\entity\Entity::getNetworkProperties ( )
inherited

Definition at line 630 of file Entity.php.

◆ getNetworkTypeId()

static pocketmine\entity\Human::getNetworkTypeId ( )
static

Reimplemented from pocketmine\entity\Entity.

Definition at line 101 of file Human.php.

◆ getOffHandInventory()

pocketmine\entity\Human::getOffHandInventory ( )

Definition at line 235 of file Human.php.

◆ getOffsetPosition()

pocketmine\entity\Human::getOffsetPosition ( Vector3 $vector3)

Reimplemented from pocketmine\entity\Entity.

Definition at line 527 of file Human.php.

◆ getOwningEntity()

pocketmine\entity\Entity::getOwningEntity ( )
inherited

Returns the owning entity, or null if the entity was not found.

Definition at line 405 of file Entity.php.

References pocketmine\server().

+ Here is the call graph for this function:

◆ getOwningEntityId()

pocketmine\entity\Entity::getOwningEntityId ( )
inherited

Returns the entity ID of the owning entity, or null if the entity doesn't have an owner.

Definition at line 398 of file Entity.php.

◆ getPosition()

pocketmine\entity\Entity::getPosition ( )
inherited

Definition at line 1330 of file Entity.php.

◆ getScale()

pocketmine\entity\Entity::getScale ( )
inherited

Definition at line 287 of file Entity.php.

◆ getScoreTag()

pocketmine\entity\Entity::getScoreTag ( )
inherited

Definition at line 278 of file Entity.php.

◆ getSize()

pocketmine\entity\Entity::getSize ( )
inherited

Definition at line 316 of file Entity.php.

◆ getSkin()

pocketmine\entity\Human::getSkin ( )

Returns a Skin object containing information about this human's skin.

Definition at line 148 of file Human.php.

◆ getTargetBlock()

pocketmine\entity\Living::getTargetBlock ( int $maxDistance,
array $transparent = [] )
inherited
Parameters
true[]$transparent@phpstan-param array<int, true> $transparent

Definition at line 849 of file Living.php.

◆ getTargetEntity()

pocketmine\entity\Entity::getTargetEntity ( )
inherited

Returns the entity's target entity, or null if not found. This is used for things like hostile mobs attacking entities, and for fishing rods reeling hit entities in.

Definition at line 436 of file Entity.php.

References pocketmine\server().

+ Here is the call graph for this function:

◆ getTargetEntityId()

pocketmine\entity\Entity::getTargetEntityId ( )
inherited

Returns the entity ID of the entity's target, or null if it doesn't have a target.

Definition at line 428 of file Entity.php.

◆ getUniqueId()

pocketmine\entity\Human::getUniqueId ( )

Reimplemented in pocketmine\player\Player.

Definition at line 141 of file Human.php.

◆ getViewers()

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

Definition at line 1480 of file Entity.php.

◆ getWorld()

pocketmine\entity\Entity::getWorld ( )
inherited

Definition at line 1338 of file Entity.php.

◆ getXpDropAmount()

pocketmine\entity\Human::getXpDropAmount ( )

Returns the amount of XP this mob will drop on death.

Reimplemented from pocketmine\entity\Living.

Reimplemented in pocketmine\player\Player.

Definition at line 225 of file Human.php.

◆ getXpManager()

pocketmine\entity\Human::getXpManager ( )

Definition at line 209 of file Human.php.

◆ hasGravity()

pocketmine\entity\Entity::hasGravity ( )
inherited

Definition at line 815 of file Entity.php.

◆ hasMovementUpdate()

pocketmine\entity\Entity::hasMovementUpdate ( )
inherited

Returns whether the entity needs a movement update on the next tick.

Reimplemented in pocketmine\entity\object\Painting, and pocketmine\entity\projectile\Projectile.

Definition at line 1055 of file Entity.php.

◆ hasNoClientPredictions()

pocketmine\entity\Entity::hasNoClientPredictions ( )
inherited

Returns whether clients may predict this entity's behaviour and movement. Used for things like water movement, burning, and movement smoothing (interpolation).

Definition at line 330 of file Entity.php.

◆ heal()

pocketmine\entity\Entity::heal ( EntityRegainHealthEvent $source)
inherited

Definition at line 548 of file Entity.php.

◆ initEntity()

pocketmine\entity\Human::initEntity ( CompoundTag $nbt)
protected

Reimplemented from pocketmine\entity\Living.

Definition at line 262 of file Human.php.

◆ initHumanData()

pocketmine\entity\Human::initHumanData ( CompoundTag $nbt)
protected

For Human entities which are not players, sets their properties such as nametag, skin and UUID from NBT.

Reimplemented in pocketmine\player\Player.

Definition at line 244 of file Human.php.

◆ isAlive()

pocketmine\entity\Entity::isAlive ( )
inherited

Definition at line 579 of file Entity.php.

◆ isBreathing()

pocketmine\entity\Living::isBreathing ( )
inherited

Returns whether the entity is currently breathing or not. If this is false, the entity's air supply will be used.

Definition at line 735 of file Living.php.

◆ isClosed()

pocketmine\entity\Entity::isClosed ( )
inherited

Returns whether the entity has been "closed".

Definition at line 1578 of file Entity.php.

◆ isFireProof()

pocketmine\entity\Entity::isFireProof ( )
inherited

Definition at line 713 of file Entity.php.

◆ isFlaggedForDespawn()

pocketmine\entity\Entity::isFlaggedForDespawn ( )
inherited

Definition at line 1571 of file Entity.php.

◆ isGliding()

pocketmine\entity\Living::isGliding ( )
inherited

Definition at line 254 of file Living.php.

◆ isInsideOfSolid()

pocketmine\entity\Entity::isInsideOfSolid ( )
inherited

Definition at line 1130 of file Entity.php.

◆ isInvisible()

pocketmine\entity\Entity::isInvisible ( )
inherited

Definition at line 347 of file Entity.php.

◆ isNameTagAlwaysVisible()

pocketmine\entity\Entity::isNameTagAlwaysVisible ( )
inherited

Definition at line 251 of file Entity.php.

◆ isNameTagVisible()

pocketmine\entity\Entity::isNameTagVisible ( )
inherited

Definition at line 247 of file Entity.php.

◆ isOnFire()

pocketmine\entity\Entity::isOnFire ( )
inherited

Definition at line 679 of file Entity.php.

◆ isOnGround()

pocketmine\entity\Entity::isOnGround ( )
inherited

Definition at line 1430 of file Entity.php.

◆ isSilent()

pocketmine\entity\Entity::isSilent ( )
inherited

Definition at line 356 of file Entity.php.

◆ isSneaking()

pocketmine\entity\Living::isSneaking ( )
inherited

Definition at line 230 of file Living.php.

◆ isSprinting()

pocketmine\entity\Living::isSprinting ( )
inherited

Definition at line 240 of file Living.php.

◆ isSwimming()

pocketmine\entity\Living::isSwimming ( )
inherited

Definition at line 264 of file Living.php.

◆ isUnderwater()

pocketmine\entity\Entity::isUnderwater ( )
inherited

Definition at line 1119 of file Entity.php.

◆ jump()

pocketmine\entity\Human::jump ( )

Called when the entity jumps from the ground. This method adds upwards velocity to the entity.

Reimplemented from pocketmine\entity\Living.

Reimplemented in pocketmine\player\Player.

Definition at line 172 of file Human.php.

◆ kill()

pocketmine\entity\Entity::kill ( )
inherited

Definition at line 557 of file Entity.php.

◆ knockBack()

pocketmine\entity\Living::knockBack ( float $x,
float $z,
float $force = self::DEFAULT_KNOCKBACK_FORCE,
?float $verticalLimit = self::DEFAULT_KNOCKBACK_VERTICAL_LIMIT )
inherited

Definition at line 594 of file Living.php.

◆ lookAt()

pocketmine\entity\Living::lookAt ( Vector3 $target)
inherited

Changes the entity's yaw and pitch to make it look at the specified Vector3 position. For mobs, this will cause their heads to turn.

Definition at line 862 of file Living.php.

◆ move()

pocketmine\entity\Entity::move ( float $dx,
float $dy,
float $dz )
protectedinherited

Definition at line 1136 of file Entity.php.

◆ nextRuntimeId()

static pocketmine\entity\Entity::nextRuntimeId ( )
staticinherited

Returns a new runtime entity ID for a new entity.

Definition at line 101 of file Entity.php.

◆ onAirExpired()

pocketmine\entity\Living::onAirExpired ( )
inherited

Called when the entity's air supply ticks reaches -20 or lower. The entity will usually take damage at this point and then the supply is reset to 0, so this method will be called roughly every second.

Reimplemented in pocketmine\entity\WaterAnimal.

Definition at line 783 of file Living.php.

◆ onCollideWithPlayer()

pocketmine\entity\Entity::onCollideWithPlayer ( Player $player)
inherited

Definition at line 1108 of file Entity.php.

◆ onDeath()

pocketmine\entity\Living::onDeath ( )
protectedinherited

Override this to do actions on death.

Reimplemented from pocketmine\entity\Entity.

Reimplemented in pocketmine\player\Player.

Definition at line 618 of file Living.php.

◆ onDeathUpdate()

pocketmine\entity\Living::onDeathUpdate ( int $tickDiff)
protectedinherited

Called to tick entities while dead. Returns whether the entity should be flagged for despawn yet.

Reimplemented from pocketmine\entity\Entity.

Reimplemented in pocketmine\player\Player.

Definition at line 631 of file Living.php.

◆ onDispose()

pocketmine\entity\Human::onDispose ( )
protected

Called when the entity is disposed to clean up things like viewers. This SHOULD NOT destroy internal state, because it may be needed by descendent classes.

Reimplemented from pocketmine\entity\Living.

Reimplemented in pocketmine\player\Player.

Definition at line 531 of file Human.php.

◆ onFirstUpdate()

pocketmine\entity\Entity::onFirstUpdate ( int $currentTick)
protectedinherited

Called from onUpdate() on the first tick of a new entity. This is called before any movement processing or main ticking logic. Use this to fire any events related to spawning the entity.

Reimplemented in pocketmine\entity\object\ItemEntity.

Definition at line 961 of file Entity.php.

◆ onHitGround()

pocketmine\entity\Living::onHitGround ( )
protectedinherited

Called when a falling entity hits the ground.

Reimplemented from pocketmine\entity\Entity.

Definition at line 365 of file Living.php.

◆ onInteract()

pocketmine\entity\Entity::onInteract ( Player $player,
Vector3 $clickPos )
inherited

Called when interacted or tapped by a Player. Returns whether something happened as a result of the interaction.

Definition at line 1115 of file Entity.php.

◆ onNearbyBlockChange()

pocketmine\entity\Entity::onNearbyBlockChange ( )
inherited

Definition at line 1029 of file Entity.php.

◆ onRandomUpdate()

pocketmine\entity\Entity::onRandomUpdate ( )
inherited

Called when a random update is performed on the chunk the entity is in. This happens when the chunk is within the ticking chunk range of a player (or chunk loader).

Reimplemented in pocketmine\entity\object\Painting.

Definition at line 1038 of file Entity.php.

◆ onUpdate()

pocketmine\entity\Entity::onUpdate ( int $currentTick)
inherited

Definition at line 965 of file Entity.php.

◆ parseSkinNBT()

static pocketmine\entity\Human::parseSkinNBT ( CompoundTag $nbt)
static
Exceptions
InvalidSkinException
SavedDataLoadingException

Definition at line 127 of file Human.php.

◆ recalculateBoundingBox()

pocketmine\entity\Entity::recalculateBoundingBox ( )
protectedinherited

Definition at line 303 of file Entity.php.

◆ regenerateEnchantmentSeed()

pocketmine\entity\Human::regenerateEnchantmentSeed ( )

Definition at line 221 of file Human.php.

◆ resetFallDistance()

pocketmine\entity\Entity::resetFallDistance ( )
inherited

Definition at line 1071 of file Entity.php.

◆ resetLastMovements()

pocketmine\entity\Entity::resetLastMovements ( )
protectedinherited

Definition at line 1392 of file Entity.php.

◆ respawnToAll()

pocketmine\entity\Entity::respawnToAll ( )
inherited

Definition at line 1530 of file Entity.php.

◆ saveNBT()

pocketmine\entity\Human::saveNBT ( )

Reimplemented from pocketmine\entity\Living.

Definition at line 411 of file Human.php.

◆ scheduleUpdate()

pocketmine\entity\Entity::scheduleUpdate ( )
finalinherited

Definition at line 1022 of file Entity.php.

◆ sendData()

pocketmine\entity\Entity::sendData ( ?array $targets,
?array $data = null )
inherited
Parameters
Player[] | null$targets
MetadataProperty[]$dataProperly formatted entity data, defaults to everything

@phpstan-param array<int, MetadataProperty> $data

Reimplemented in pocketmine\player\Player.

Definition at line 1630 of file Entity.php.

◆ sendSkin()

pocketmine\entity\Human::sendSkin ( ?array $targets = null)

Sends the human's skin to the specified list of players. If null is given for targets, the skin will be sent to all viewers.

Parameters
Player[] | null$targets

Reimplemented in pocketmine\player\Player.

Definition at line 166 of file Human.php.

◆ sendSpawnPacket()

pocketmine\entity\Human::sendSpawnPacket ( Player $player)
protected

Called by spawnTo() to send whatever packets needed to spawn the entity to the client.

Reimplemented from pocketmine\entity\Living.

Definition at line 481 of file Human.php.

◆ setAbsorption()

pocketmine\entity\Living::setAbsorption ( float $absorption)
inherited

Definition at line 226 of file Living.php.

◆ setAirSupplyTicks()

pocketmine\entity\Living::setAirSupplyTicks ( int $ticks)
inherited

Sets the number of air ticks left in the entity's air supply.

Definition at line 759 of file Living.php.

◆ setBreathing()

pocketmine\entity\Living::setBreathing ( bool $value = true)
inherited

Sets whether the entity is currently breathing. If false, it will cause the entity's air supply to be used. For players, this also shows the oxygen bar.

Definition at line 743 of file Living.php.

◆ setCanClimb()

pocketmine\entity\Entity::setCanClimb ( bool $value = true)
inherited

Sets whether the entity is able to climb climbable blocks.

Definition at line 375 of file Entity.php.

◆ setCanClimbWalls()

pocketmine\entity\Entity::setCanClimbWalls ( bool $value = true)
inherited

Sets whether the entity is climbing a block. If true, the entity can climb anything.

Definition at line 390 of file Entity.php.

◆ setCanSaveWithChunk()

pocketmine\entity\Entity::setCanSaveWithChunk ( bool $value)
inherited

Sets whether this entity will be saved when its chunk is unloaded. This can be used to prevent the entity being saved to disk.

Reimplemented in pocketmine\player\Player.

Definition at line 467 of file Entity.php.

◆ setEnchantmentSeed()

pocketmine\entity\Human::setEnchantmentSeed ( int $seed)

Definition at line 217 of file Human.php.

◆ setFallDistance()

pocketmine\entity\Entity::setFallDistance ( float $fallDistance)
inherited

Definition at line 1067 of file Entity.php.

◆ setFireTicks()

pocketmine\entity\Entity::setFireTicks ( int $fireTicks)
inherited
Exceptions

InvalidArgumentException

Definition at line 698 of file Entity.php.

◆ setForceMovementUpdate()

pocketmine\entity\Entity::setForceMovementUpdate ( bool $value = true)
finalinherited

Flags the entity as needing a movement update on the next tick. Setting this forces a movement update even if the entity's motion is zero. Used to trigger movement updates when blocks change near entities.

Definition at line 1046 of file Entity.php.

◆ setGliding()

pocketmine\entity\Living::setGliding ( bool $value = true)
inherited

Definition at line 258 of file Living.php.

◆ setGravity()

pocketmine\entity\Entity::setGravity ( float $gravity)
inherited

Definition at line 810 of file Entity.php.

◆ setHasGravity()

pocketmine\entity\Entity::setHasGravity ( bool $v = true)
inherited

Definition at line 819 of file Entity.php.

◆ setHealth()

pocketmine\entity\Living::setHealth ( float $amount)
inherited

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

Reimplemented from pocketmine\entity\Entity.

Definition at line 205 of file Living.php.

Referenced by pocketmine\entity\effect\HealthBoostEffect\remove().

+ Here is the caller graph for this function:

◆ setInvisible()

pocketmine\entity\Entity::setInvisible ( bool $value = true)
inherited

Definition at line 351 of file Entity.php.

◆ setLastDamageCause()

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

Definition at line 618 of file Entity.php.

◆ setMaxAirSupplyTicks()

pocketmine\entity\Living::setMaxAirSupplyTicks ( int $ticks)
inherited

Sets the maximum amount of air ticks the air supply can hold.

Definition at line 774 of file Living.php.

◆ setMaxHealth()

pocketmine\entity\Living::setMaxHealth ( int $amount)
inherited

Reimplemented from pocketmine\entity\Entity.

Definition at line 218 of file Living.php.

◆ setMotion()

pocketmine\entity\Entity::setMotion ( Vector3 $motion)
inherited

Definition at line 1401 of file Entity.php.

◆ setMovementSpeed()

pocketmine\entity\Living::setMovementSpeed ( float $v,
bool $fit = false )
inherited

Definition at line 290 of file Living.php.

◆ setNameTag()

pocketmine\entity\Entity::setNameTag ( string $name)
inherited

Definition at line 263 of file Entity.php.

◆ setNameTagAlwaysVisible()

pocketmine\entity\Entity::setNameTagAlwaysVisible ( bool $value = true)
inherited

Definition at line 273 of file Entity.php.

◆ setNameTagVisible()

pocketmine\entity\Entity::setNameTagVisible ( bool $value = true)
inherited

Definition at line 268 of file Entity.php.

◆ setNoClientPredictions()

pocketmine\entity\Entity::setNoClientPredictions ( bool $value = true)
inherited

Things such as movement in water, burning, etc. may be predicted by the client. This is sometimes not desirable, since server-side logic may differ from client-side prediction. However, things like movement smoothing (interpolation) are also controlled by this, so it should be used with care.

Setting this flag will also disable player movement inputs, but this should not be relied on, as cheat clients will be able to bypass it.

Definition at line 342 of file Entity.php.

◆ setOnFire()

pocketmine\entity\Living::setOnFire ( int $seconds)
inherited

Reimplemented from pocketmine\entity\Entity.

Definition at line 419 of file Living.php.

◆ setOwningEntity()

pocketmine\entity\Entity::setOwningEntity ( ?Entity $owner)
inherited

Sets the owner of the entity. Passing null will remove the current owner.

Exceptions

InvalidArgumentException if the supplied entity is not valid

Definition at line 414 of file Entity.php.

◆ setPosition()

pocketmine\entity\Entity::setPosition ( Vector3 $pos)
protectedinherited

Definition at line 1342 of file Entity.php.

◆ setPositionAndRotation()

pocketmine\entity\Entity::setPositionAndRotation ( Vector3 $pos,
float $yaw,
float $pitch )
protectedinherited

Definition at line 1382 of file Entity.php.

◆ setRotation()

pocketmine\entity\Entity::setRotation ( float $yaw,
float $pitch )
inherited

Definition at line 1374 of file Entity.php.

◆ setScale()

pocketmine\entity\Entity::setScale ( float $value)
inherited

Definition at line 291 of file Entity.php.

◆ setScoreTag()

pocketmine\entity\Entity::setScoreTag ( string $score)
inherited

Definition at line 282 of file Entity.php.

◆ setSilent()

pocketmine\entity\Entity::setSilent ( bool $value = true)
inherited

Definition at line 360 of file Entity.php.

◆ setSize()

pocketmine\entity\Entity::setSize ( EntitySizeInfo $size)
protectedinherited

Definition at line 320 of file Entity.php.

◆ setSkin()

pocketmine\entity\Human::setSkin ( Skin $skin)

Sets the human's skin. This will not send any update to viewers, you need to do that manually using sendSkin.

Definition at line 156 of file Human.php.

◆ setSneaking()

pocketmine\entity\Living::setSneaking ( bool $value = true)
inherited

Definition at line 234 of file Living.php.

◆ setSprinting()

pocketmine\entity\Living::setSprinting ( bool $value = true)
inherited

Definition at line 244 of file Living.php.

◆ setSwimming()

pocketmine\entity\Living::setSwimming ( bool $value = true)
inherited

Definition at line 268 of file Living.php.

◆ setTargetEntity()

pocketmine\entity\Entity::setTargetEntity ( ?Entity $target)
inherited

Sets the entity's target entity. Passing null will remove the current target.

Exceptions

InvalidArgumentException if the target entity is not valid

Definition at line 445 of file Entity.php.

◆ spawnTo()

pocketmine\entity\Human::spawnTo ( Player $player)

Reimplemented from pocketmine\entity\Entity.

Definition at line 475 of file Human.php.

◆ spawnToAll()

pocketmine\entity\Entity::spawnToAll ( )
inherited

Definition at line 1521 of file Entity.php.

◆ startDeathAnimation()

pocketmine\entity\Living::startDeathAnimation ( )
protectedinherited

Definition at line 642 of file Living.php.

◆ syncNetworkData()

pocketmine\entity\Living::syncNetworkData ( EntityMetadataCollection $properties)
protectedinherited

Reimplemented from pocketmine\entity\Entity.

Definition at line 885 of file Living.php.

◆ teleport()

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

Reimplemented in pocketmine\player\Player.

Definition at line 1437 of file Entity.php.

Referenced by pocketmine\item\ChorusFruit\onConsume().

+ Here is the caller graph for this function:

◆ tryChangeMovement()

pocketmine\entity\Entity::tryChangeMovement ( )
protectedinherited

Definition at line 827 of file Entity.php.

◆ updateFallState()

pocketmine\entity\Entity::updateFallState ( float $distanceThisTick,
bool $onGround )
protectedinherited

Definition at line 1075 of file Entity.php.

◆ updateMovement()

pocketmine\entity\Entity::updateMovement ( bool $teleport = false)
protectedinherited

Definition at line 754 of file Entity.php.

Member Data Documentation

◆ $absorptionAttr

Attribute pocketmine\entity\Living::$absorptionAttr
protectedinherited

Definition at line 122 of file Living.php.

◆ $alwaysShowNameTag

bool pocketmine\entity\Entity::$alwaysShowNameTag = false
protectedinherited

Definition at line 168 of file Entity.php.

◆ $armorInventory

ArmorInventory pocketmine\entity\Living::$armorInventory
protectedinherited

Definition at line 115 of file Living.php.

◆ $attackTime

int pocketmine\entity\Living::$attackTime = 0
protectedinherited

Definition at line 106 of file Living.php.

◆ $attributeMap

AttributeMap pocketmine\entity\Entity::$attributeMap
protectedinherited

Definition at line 150 of file Entity.php.

◆ $blocksAround

array pocketmine\entity\Entity::$blocksAround = null
protectedinherited

Definition at line 115 of file Entity.php.

◆ $boundingBox

AxisAlignedBB pocketmine\entity\Entity::$boundingBox
inherited

Definition at line 124 of file Entity.php.

◆ $breathing

bool pocketmine\entity\Living::$breathing = true
protectedinherited

Definition at line 117 of file Living.php.

◆ $breathTicks

int pocketmine\entity\Living::$breathTicks = self::DEFAULT_BREATH_TICKS
protectedinherited

Definition at line 118 of file Living.php.

◆ $canClimb

bool pocketmine\entity\Entity::$canClimb = false
protectedinherited

Definition at line 172 of file Entity.php.

◆ $canClimbWalls

bool pocketmine\entity\Entity::$canClimbWalls = false
protectedinherited

Definition at line 173 of file Entity.php.

◆ $closed

bool pocketmine\entity\Entity::$closed = false
protectedinherited

Definition at line 158 of file Entity.php.

◆ $deadTicks

int pocketmine\entity\Living::$deadTicks = 0
inherited

Definition at line 108 of file Living.php.

◆ $drag

float pocketmine\entity\Entity::$drag
protectedinherited

Definition at line 153 of file Entity.php.

◆ $effectManager

EffectManager pocketmine\entity\Living::$effectManager
protectedinherited

Definition at line 113 of file Living.php.

◆ $enderInventory

PlayerEnderInventory pocketmine\entity\Human::$enderInventory
protected

Definition at line 105 of file Human.php.

◆ $fallDistance

float pocketmine\entity\Entity::$fallDistance = 0.0
inherited

Definition at line 136 of file Entity.php.

◆ $fireTicks

int pocketmine\entity\Entity::$fireTicks = 0
protectedinherited

Definition at line 139 of file Entity.php.

◆ $forceMovementUpdate

bool pocketmine\entity\Entity::$forceMovementUpdate = false
protectedinherited

Definition at line 121 of file Entity.php.

◆ $gliding

bool pocketmine\entity\Living::$gliding = false
protectedinherited

Definition at line 128 of file Living.php.

◆ $gravity

float pocketmine\entity\Entity::$gravity
protectedinherited

Definition at line 152 of file Entity.php.

◆ $gravityEnabled

bool pocketmine\entity\Entity::$gravityEnabled = true
protectedinherited

Definition at line 154 of file Entity.php.

◆ $hasSpawned

array pocketmine\entity\Entity::$hasSpawned = []
protectedinherited

Definition at line 106 of file Entity.php.

◆ $healthAttr

Attribute pocketmine\entity\Living::$healthAttr
protectedinherited

Definition at line 121 of file Living.php.

◆ $hungerManager

HungerManager pocketmine\entity\Human::$hungerManager
protected

Definition at line 111 of file Human.php.

◆ $id

int pocketmine\entity\Entity::$id
protectedinherited

Definition at line 108 of file Entity.php.

◆ $inventory

PlayerInventory pocketmine\entity\Human::$inventory
protected

Definition at line 103 of file Human.php.

◆ $invisible

bool pocketmine\entity\Entity::$invisible = false
protectedinherited

Definition at line 175 of file Entity.php.

◆ $isCollided

bool pocketmine\entity\Entity::$isCollided = false
inherited

Definition at line 143 of file Entity.php.

◆ $isCollidedHorizontally

bool pocketmine\entity\Entity::$isCollidedHorizontally = false
inherited

Definition at line 144 of file Entity.php.

◆ $isCollidedVertically

bool pocketmine\entity\Entity::$isCollidedVertically = false
inherited

Definition at line 145 of file Entity.php.

◆ $jumpVelocity

float pocketmine\entity\Living::$jumpVelocity = 0.42
protectedinherited

Definition at line 111 of file Living.php.

◆ $justCreated

bool pocketmine\entity\Entity::$justCreated = true
protectedinherited

Definition at line 148 of file Entity.php.

◆ $keepMovement

bool pocketmine\entity\Entity::$keepMovement = false
inherited

Definition at line 134 of file Entity.php.

◆ $knockbackResistanceAttr

Attribute pocketmine\entity\Living::$knockbackResistanceAttr
protectedinherited

Definition at line 123 of file Living.php.

◆ $lastDamageCause

EntityDamageEvent pocketmine\entity\Entity::$lastDamageCause = null
protectedinherited

Definition at line 112 of file Entity.php.

◆ $lastLocation

Location pocketmine\entity\Entity::$lastLocation
protectedinherited

Definition at line 118 of file Entity.php.

◆ $lastMotion

Vector3 pocketmine\entity\Entity::$lastMotion
protectedinherited

Definition at line 120 of file Entity.php.

◆ $lastUpdate

int pocketmine\entity\Entity::$lastUpdate
inherited

Definition at line 138 of file Entity.php.

◆ $location

Location pocketmine\entity\Entity::$location
protectedinherited

Definition at line 117 of file Entity.php.

◆ $maxBreathTicks

int pocketmine\entity\Living::$maxBreathTicks = self::DEFAULT_BREATH_TICKS
protectedinherited

Definition at line 119 of file Living.php.

◆ $maxDeadTicks

int pocketmine\entity\Living::$maxDeadTicks = 25
protectedinherited

Definition at line 109 of file Living.php.

◆ $motion

Vector3 pocketmine\entity\Entity::$motion
protectedinherited

Definition at line 119 of file Entity.php.

◆ $moveSpeedAttr

Attribute pocketmine\entity\Living::$moveSpeedAttr
protectedinherited

Definition at line 124 of file Living.php.

◆ $nameTag

string pocketmine\entity\Entity::$nameTag = ""
protectedinherited

Definition at line 166 of file Entity.php.

◆ $nameTagVisible

bool pocketmine\entity\Entity::$nameTagVisible = true
protectedinherited

Definition at line 167 of file Entity.php.

◆ $networkPropertiesDirty

bool pocketmine\entity\Entity::$networkPropertiesDirty = false
protectedinherited

Definition at line 164 of file Entity.php.

◆ $noClientPredictions

bool pocketmine\entity\Entity::$noClientPredictions = false
protectedinherited

Definition at line 174 of file Entity.php.

◆ $noDamageTicks

int pocketmine\entity\Entity::$noDamageTicks = 0
inherited

Definition at line 147 of file Entity.php.

◆ $offHandInventory

PlayerOffHandInventory pocketmine\entity\Human::$offHandInventory
protected

Definition at line 104 of file Human.php.

◆ $onGround

bool pocketmine\entity\Entity::$onGround = false
inherited

Definition at line 125 of file Entity.php.

◆ $ownerId

int pocketmine\entity\Entity::$ownerId = null
protectedinherited

Definition at line 178 of file Entity.php.

◆ $scale

float pocketmine\entity\Entity::$scale = 1.0
protectedinherited

Definition at line 170 of file Entity.php.

◆ $scoreTag

string pocketmine\entity\Entity::$scoreTag = ""
protectedinherited

Definition at line 169 of file Entity.php.

◆ $server

Server pocketmine\entity\Entity::$server
protectedinherited

Definition at line 156 of file Entity.php.

◆ $silent

bool pocketmine\entity\Entity::$silent = false
protectedinherited

Definition at line 176 of file Entity.php.

◆ $size

EntitySizeInfo pocketmine\entity\Entity::$size
inherited

Definition at line 127 of file Entity.php.

◆ $skin

Skin pocketmine\entity\Human::$skin
protected

Definition at line 109 of file Human.php.

◆ $sneaking

bool pocketmine\entity\Living::$sneaking = false
protectedinherited

Definition at line 127 of file Living.php.

◆ $sprinting

bool pocketmine\entity\Living::$sprinting = false
protectedinherited

Definition at line 126 of file Living.php.

◆ $stepHeight

float pocketmine\entity\Entity::$stepHeight = 0.0
protectedinherited

Definition at line 133 of file Entity.php.

◆ $swimming

bool pocketmine\entity\Living::$swimming = false
protectedinherited

Definition at line 129 of file Living.php.

◆ $targetId

int pocketmine\entity\Entity::$targetId = null
protectedinherited

Definition at line 179 of file Entity.php.

◆ $ticksLived

int pocketmine\entity\Entity::$ticksLived = 0
inherited

Definition at line 137 of file Entity.php.

◆ $timings

TimingsHandler pocketmine\entity\Entity::$timings
protectedinherited

Definition at line 162 of file Entity.php.

◆ $uuid

UuidInterface pocketmine\entity\Human::$uuid
protected

Definition at line 107 of file Human.php.

◆ $xpManager

ExperienceManager pocketmine\entity\Human::$xpManager
protected

Definition at line 112 of file Human.php.

◆ $xpSeed

int pocketmine\entity\Human::$xpSeed
protected

Definition at line 114 of file Human.php.

◆ $ySize

float pocketmine\entity\Entity::$ySize = 0.0
protectedinherited

Definition at line 132 of file Entity.php.

◆ DEFAULT_BREATH_TICKS

const pocketmine\entity\Living::DEFAULT_BREATH_TICKS = 300
protectedinherited

Definition at line 83 of file Living.php.

◆ DEFAULT_KNOCKBACK_FORCE

const pocketmine\entity\Living::DEFAULT_KNOCKBACK_FORCE = 0.4
inherited

The default knockback multiplier when an entity is hit by another entity. Larger values knock the entity back with increased velocity.

Definition at line 89 of file Living.php.

◆ DEFAULT_KNOCKBACK_VERTICAL_LIMIT

const pocketmine\entity\Living::DEFAULT_KNOCKBACK_VERTICAL_LIMIT = 0.4
inherited

Limit of an entity's vertical knockback velocity when hit by another entity. Without this limit, the entity may be knocked far up into the air with large knockback forces.

Definition at line 94 of file Living.php.

◆ MOTION_THRESHOLD

const pocketmine\entity\Entity::MOTION_THRESHOLD = 0.00001
inherited

Definition at line 84 of file Entity.php.

◆ STEP_CLIP_MULTIPLIER

const pocketmine\entity\Entity::STEP_CLIP_MULTIPLIER = 0.4
protectedinherited

Definition at line 85 of file Entity.php.

◆ TAG_MOTION

const pocketmine\entity\Entity::TAG_MOTION = "Motion"
inherited

Definition at line 93 of file Entity.php.

◆ TAG_POS

const pocketmine\entity\Entity::TAG_POS = "Pos"
inherited

Definition at line 92 of file Entity.php.

◆ TAG_ROTATION

const pocketmine\entity\Entity::TAG_ROTATION = "Rotation"
inherited

Definition at line 94 of file Entity.php.


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