|
| __toString () |
|
| addMotion (float $x, float $y, float $z) |
|
| attack (EntityDamageEvent $source) |
|
| broadcastAnimation (Animation $animation, ?array $targets=null) |
|
| broadcastSound (Sound $sound, ?array $targets=null) |
|
| canBeCollidedWith () |
|
| canBeMovedByCurrents () |
|
| canBeRenamed () |
|
| canClimb () |
|
| canClimbWalls () |
|
| canCollideWith (Entity $entity) |
|
| canSaveWithChunk () |
|
| close () |
|
| despawnFrom (Player $player, bool $send=true) |
|
| despawnFromAll () |
|
| extinguish () |
|
| flagForDespawn () |
|
| getAttributeMap () |
|
| getBaseDamage () |
|
| getBoundingBox () |
|
| getDirectionPlane () |
|
| getDirectionVector () |
|
| getEyeHeight () |
|
| getEyePos () |
|
| getFallDistance () |
|
| getFireTicks () |
|
| getGravity () |
|
| getHealth () |
|
| getHorizontalFacing () |
|
| getId () |
|
| getLastDamageCause () |
|
| getLocation () |
|
| getMaxHealth () |
|
| getMotion () |
|
| getNameTag () |
|
| getNetworkProperties () |
|
| getOffsetPosition (Vector3 $vector3) |
|
| getOwningEntity () |
|
| getOwningEntityId () |
|
| getPosition () |
|
| getResultDamage () |
|
| getScale () |
|
| getScoreTag () |
|
| getSize () |
|
| getTargetEntity () |
|
| getTargetEntityId () |
|
| getViewers () |
|
| getWorld () |
|
| hasGravity () |
|
| hasMovementUpdate () |
|
| hasNoClientPredictions () |
|
| heal (EntityRegainHealthEvent $source) |
|
| isAlive () |
|
| isClosed () |
|
| isFireProof () |
|
| isFlaggedForDespawn () |
|
| isInsideOfSolid () |
|
| isInvisible () |
|
| isNameTagAlwaysVisible () |
|
| isNameTagVisible () |
|
| isOnFire () |
|
| isOnGround () |
|
| isSilent () |
|
| isUnderwater () |
|
| kill () |
|
| onCollideWithPlayer (Player $player) |
|
| onHit (ProjectileHitEvent $event) |
|
| onInteract (Player $player, Vector3 $clickPos) |
|
| onNearbyBlockChange () |
|
| onRandomUpdate () |
|
| onUpdate (int $currentTick) |
|
| resetFallDistance () |
|
| respawnToAll () |
|
| saveNBT () |
|
| scheduleUpdate () |
|
| sendData (?array $targets, ?array $data=null) |
|
| setBaseDamage (float $damage) |
|
| setCanClimb (bool $value=true) |
|
| setCanClimbWalls (bool $value=true) |
|
| setCanSaveWithChunk (bool $value) |
|
| setFallDistance (float $fallDistance) |
|
| setFireTicks (int $fireTicks) |
|
| setForceMovementUpdate (bool $value=true) |
|
| setGravity (float $gravity) |
|
| setHasGravity (bool $v=true) |
|
| setHealth (float $amount) |
|
| setInvisible (bool $value=true) |
|
| setLastDamageCause (EntityDamageEvent $type) |
|
| setMaxHealth (int $amount) |
|
| setMotion (Vector3 $motion) |
|
| 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) |
|
| setTargetEntity (?Entity $target) |
|
| spawnTo (Player $player) |
|
| spawnToAll () |
|
| teleport (Vector3 $pos, ?float $yaw=null, ?float $pitch=null) |
|
|
| addAttributes () |
|
| applyDragBeforeGravity () |
|
| broadcastMotion () |
|
| broadcastMovement (bool $teleport=false) |
|
| calculateInterceptWithBlock (Block $block, Vector3 $start, Vector3 $end) |
|
| checkBlockIntersections () |
|
| checkGroundState (float $wantedX, float $wantedY, float $wantedZ, float $dx, float $dy, float $dz) |
|
| checkObstruction (float $x, float $y, float $z) |
|
| dealFireDamage () |
|
| destroyCycles () |
|
| doOnFireTick (int $tickDiff=1) |
|
| entityBaseTick (int $tickDiff=1) |
|
| getAllNetworkData () |
|
| getBlocksAroundWithEntityInsideActions () |
|
| getBlocksIntersected (float $inset) |
|
| getDirtyNetworkData () |
|
| getInitialDragMultiplier () |
|
| getInitialGravity () |
|
| getInitialSizeInfo () |
|
| initEntity (CompoundTag $nbt) |
|
| move (float $dx, float $dy, float $dz) |
|
| onDeath () |
|
| onDeathUpdate (int $tickDiff) |
|
| onDispose () |
|
| onFirstUpdate (int $currentTick) |
|
| onHitBlock (Block $blockHit, RayTraceResult $hitResult) |
|
| onHitEntity (Entity $entityHit, RayTraceResult $hitResult) |
|
| onHitGround () |
|
| recalculateBoundingBox () |
|
| resetLastMovements () |
|
| sendSpawnPacket (Player $player) |
|
| setPosition (Vector3 $pos) |
|
| setPositionAndRotation (Vector3 $pos, float $yaw, float $pitch) |
|
| setSize (EntitySizeInfo $size) |
|
| syncNetworkData (EntityMetadataCollection $properties) |
|
| tryChangeMovement () |
|
| updateFallState (float $distanceThisTick, bool $onGround) |
|
| updateMovement (bool $teleport=false) |
|
◆ __toString()
pocketmine\entity\Entity::__toString |
( |
| ) |
|
|
inherited |
◆ addAttributes()
pocketmine\entity\Entity::addAttributes |
( |
| ) |
|
|
protectedinherited |
◆ addMotion()
pocketmine\entity\Entity::addMotion |
( |
float | $x, |
|
|
float | $y, |
|
|
float | $z ) |
|
inherited |
◆ applyDragBeforeGravity()
pocketmine\entity\projectile\Projectile::applyDragBeforeGravity |
( |
| ) |
|
|
protectedinherited |
◆ attack()
◆ broadcastAnimation()
pocketmine\entity\Entity::broadcastAnimation |
( |
Animation | $animation, |
|
|
?array | $targets = null ) |
|
inherited |
◆ broadcastMotion()
pocketmine\entity\Entity::broadcastMotion |
( |
| ) |
|
|
protectedinherited |
◆ broadcastMovement()
pocketmine\entity\Entity::broadcastMovement |
( |
bool | $teleport = false | ) |
|
|
protectedinherited |
◆ 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
-
Reimplemented in pocketmine\player\Player.
Definition at line 1695 of file Entity.php.
◆ calculateInterceptWithBlock()
pocketmine\entity\projectile\Projectile::calculateInterceptWithBlock |
( |
Block | $block, |
|
|
Vector3 | $start, |
|
|
Vector3 | $end ) |
|
protectedinherited |
Called by move() when raytracing blocks to discover whether the block should be considered as a point of impact. 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).
- Returns
- RayTraceResult|null the result of the ray trace if successful, or null if no interception is found.
Definition at line 273 of file Projectile.php.
◆ canBeCollidedWith()
pocketmine\entity\projectile\Projectile::canBeCollidedWith |
( |
| ) |
|
|
inherited |
◆ canBeMovedByCurrents()
pocketmine\entity\Entity::canBeMovedByCurrents |
( |
| ) |
|
|
inherited |
◆ canBeRenamed()
pocketmine\entity\Entity::canBeRenamed |
( |
| ) |
|
|
inherited |
◆ 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\projectile\Projectile::canCollideWith |
( |
Entity | $entity | ) |
|
|
inherited |
◆ canSaveWithChunk()
pocketmine\entity\Entity::canSaveWithChunk |
( |
| ) |
|
|
inherited |
◆ checkBlockIntersections()
pocketmine\entity\Entity::checkBlockIntersections |
( |
| ) |
|
|
protectedinherited |
◆ checkGroundState()
pocketmine\entity\Entity::checkGroundState |
( |
float | $wantedX, |
|
|
float | $wantedY, |
|
|
float | $wantedZ, |
|
|
float | $dx, |
|
|
float | $dy, |
|
|
float | $dz ) |
|
protectedinherited |
◆ checkObstruction()
pocketmine\entity\Entity::checkObstruction |
( |
float | $x, |
|
|
float | $y, |
|
|
float | $z ) |
|
protectedinherited |
◆ 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.
◆ 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\Entity::destroyCycles |
( |
| ) |
|
|
protectedinherited |
◆ doOnFireTick()
pocketmine\entity\Entity::doOnFireTick |
( |
int | $tickDiff = 1 | ) |
|
|
protectedinherited |
◆ entityBaseTick()
pocketmine\entity\Entity::entityBaseTick |
( |
int | $tickDiff = 1 | ) |
|
|
protectedinherited |
◆ extinguish()
pocketmine\entity\Entity::extinguish |
( |
| ) |
|
|
inherited |
◆ 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.
◆ getAllNetworkData()
pocketmine\entity\Entity::getAllNetworkData |
( |
| ) |
|
|
finalprotectedinherited |
- Returns
- MetadataProperty[] @phpstan-return array<int, MetadataProperty>
Definition at line 1653 of file Entity.php.
◆ getAttributeMap()
pocketmine\entity\Entity::getAttributeMap |
( |
| ) |
|
|
inherited |
◆ getBaseDamage()
pocketmine\entity\projectile\Projectile::getBaseDamage |
( |
| ) |
|
|
inherited |
Returns the base damage applied on collision. This is multiplied by the projectile's speed to give a result damage.
Definition at line 110 of file Projectile.php.
◆ getBlocksAroundWithEntityInsideActions()
pocketmine\entity\Entity::getBlocksAroundWithEntityInsideActions |
( |
| ) |
|
|
protectedinherited |
◆ 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 |
◆ getDirectionPlane()
pocketmine\entity\Entity::getDirectionPlane |
( |
| ) |
|
|
inherited |
◆ getDirectionVector()
pocketmine\entity\Entity::getDirectionVector |
( |
| ) |
|
|
inherited |
◆ getDirtyNetworkData()
pocketmine\entity\Entity::getDirtyNetworkData |
( |
| ) |
|
|
finalprotectedinherited |
- Returns
- MetadataProperty[] @phpstan-return array<int, MetadataProperty>
Definition at line 1641 of file Entity.php.
◆ getEyeHeight()
pocketmine\entity\Entity::getEyeHeight |
( |
| ) |
|
|
inherited |
◆ getEyePos()
pocketmine\entity\Entity::getEyePos |
( |
| ) |
|
|
inherited |
◆ getFallDistance()
pocketmine\entity\Entity::getFallDistance |
( |
| ) |
|
|
inherited |
◆ getFireTicks()
pocketmine\entity\Entity::getFireTicks |
( |
| ) |
|
|
inherited |
◆ getGravity()
pocketmine\entity\Entity::getGravity |
( |
| ) |
|
|
inherited |
◆ getHealth()
pocketmine\entity\Entity::getHealth |
( |
| ) |
|
|
inherited |
◆ getHorizontalFacing()
pocketmine\entity\Entity::getHorizontalFacing |
( |
| ) |
|
|
inherited |
◆ getId()
pocketmine\entity\Entity::getId |
( |
| ) |
|
|
inherited |
◆ getInitialDragMultiplier()
pocketmine\entity\projectile\Throwable::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 34 of file Throwable.php.
◆ getInitialGravity()
pocketmine\entity\projectile\ExperienceBottle::getInitialGravity |
( |
| ) |
|
|
protected |
◆ getInitialSizeInfo()
pocketmine\entity\projectile\Throwable::getInitialSizeInfo |
( |
| ) |
|
|
protectedinherited |
◆ getLastDamageCause()
pocketmine\entity\Entity::getLastDamageCause |
( |
| ) |
|
|
inherited |
◆ getLocation()
pocketmine\entity\Entity::getLocation |
( |
| ) |
|
|
inherited |
◆ getMaxHealth()
pocketmine\entity\Entity::getMaxHealth |
( |
| ) |
|
|
inherited |
◆ getMotion()
pocketmine\entity\Entity::getMotion |
( |
| ) |
|
|
inherited |
◆ getNameTag()
pocketmine\entity\Entity::getNameTag |
( |
| ) |
|
|
inherited |
◆ getNetworkProperties()
pocketmine\entity\Entity::getNetworkProperties |
( |
| ) |
|
|
inherited |
◆ getNetworkTypeId()
static pocketmine\entity\projectile\ExperienceBottle::getNetworkTypeId |
( |
| ) |
|
|
static |
◆ getOffsetPosition()
pocketmine\entity\Entity::getOffsetPosition |
( |
Vector3 | $vector3 | ) |
|
|
inherited |
◆ getOwningEntity()
pocketmine\entity\Entity::getOwningEntity |
( |
| ) |
|
|
inherited |
◆ 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 |
◆ getResultDamage()
pocketmine\entity\projectile\ExperienceBottle::getResultDamage |
( |
| ) |
|
◆ getScale()
pocketmine\entity\Entity::getScale |
( |
| ) |
|
|
inherited |
◆ getScoreTag()
pocketmine\entity\Entity::getScoreTag |
( |
| ) |
|
|
inherited |
◆ getSize()
pocketmine\entity\Entity::getSize |
( |
| ) |
|
|
inherited |
◆ 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().
◆ 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.
◆ getViewers()
pocketmine\entity\Entity::getViewers |
( |
| ) |
|
|
inherited |
◆ getWorld()
pocketmine\entity\Entity::getWorld |
( |
| ) |
|
|
inherited |
◆ hasGravity()
pocketmine\entity\Entity::hasGravity |
( |
| ) |
|
|
inherited |
◆ hasMovementUpdate()
pocketmine\entity\projectile\Projectile::hasMovementUpdate |
( |
| ) |
|
|
inherited |
◆ 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()
◆ initEntity()
pocketmine\entity\projectile\Projectile::initEntity |
( |
CompoundTag | $nbt | ) |
|
|
protectedinherited |
◆ isAlive()
pocketmine\entity\Entity::isAlive |
( |
| ) |
|
|
inherited |
◆ 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 |
◆ isFlaggedForDespawn()
pocketmine\entity\Entity::isFlaggedForDespawn |
( |
| ) |
|
|
inherited |
◆ isInsideOfSolid()
pocketmine\entity\Entity::isInsideOfSolid |
( |
| ) |
|
|
inherited |
◆ isInvisible()
pocketmine\entity\Entity::isInvisible |
( |
| ) |
|
|
inherited |
◆ isNameTagAlwaysVisible()
pocketmine\entity\Entity::isNameTagAlwaysVisible |
( |
| ) |
|
|
inherited |
◆ isNameTagVisible()
pocketmine\entity\Entity::isNameTagVisible |
( |
| ) |
|
|
inherited |
◆ isOnFire()
pocketmine\entity\Entity::isOnFire |
( |
| ) |
|
|
inherited |
◆ isOnGround()
pocketmine\entity\Entity::isOnGround |
( |
| ) |
|
|
inherited |
◆ isSilent()
pocketmine\entity\Entity::isSilent |
( |
| ) |
|
|
inherited |
◆ isUnderwater()
pocketmine\entity\Entity::isUnderwater |
( |
| ) |
|
|
inherited |
◆ kill()
pocketmine\entity\Entity::kill |
( |
| ) |
|
|
inherited |
◆ move()
pocketmine\entity\projectile\Projectile::move |
( |
float | $dx, |
|
|
float | $dy, |
|
|
float | $dz ) |
|
protectedinherited |
◆ 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.
◆ onCollideWithPlayer()
pocketmine\entity\Entity::onCollideWithPlayer |
( |
Player | $player | ) |
|
|
inherited |
◆ onDeath()
pocketmine\entity\Entity::onDeath |
( |
| ) |
|
|
protectedinherited |
◆ onDeathUpdate()
pocketmine\entity\Entity::onDeathUpdate |
( |
int | $tickDiff | ) |
|
|
protectedinherited |
◆ onDispose()
pocketmine\entity\Entity::onDispose |
( |
| ) |
|
|
protectedinherited |
◆ 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.
◆ onHit()
◆ onHitBlock()
pocketmine\entity\projectile\Throwable::onHitBlock |
( |
Block | $blockHit, |
|
|
RayTraceResult | $hitResult ) |
|
protectedinherited |
◆ onHitEntity()
pocketmine\entity\projectile\Projectile::onHitEntity |
( |
Entity | $entityHit, |
|
|
RayTraceResult | $hitResult ) |
|
protectedinherited |
◆ onHitGround()
pocketmine\entity\Entity::onHitGround |
( |
| ) |
|
|
protectedinherited |
◆ 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\projectile\Projectile::onNearbyBlockChange |
( |
| ) |
|
|
inherited |
◆ 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 |
◆ recalculateBoundingBox()
pocketmine\entity\Entity::recalculateBoundingBox |
( |
| ) |
|
|
protectedinherited |
◆ resetFallDistance()
pocketmine\entity\Entity::resetFallDistance |
( |
| ) |
|
|
inherited |
◆ resetLastMovements()
pocketmine\entity\Entity::resetLastMovements |
( |
| ) |
|
|
protectedinherited |
◆ respawnToAll()
pocketmine\entity\Entity::respawnToAll |
( |
| ) |
|
|
inherited |
◆ saveNBT()
pocketmine\entity\projectile\Projectile::saveNBT |
( |
| ) |
|
|
inherited |
◆ scheduleUpdate()
pocketmine\entity\Entity::scheduleUpdate |
( |
| ) |
|
|
finalinherited |
◆ sendData()
pocketmine\entity\Entity::sendData |
( |
?array | $targets, |
|
|
?array | $data = null ) |
|
inherited |
- Parameters
-
Player[] | null | $targets | |
MetadataProperty[] | $data | Properly 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.
◆ sendSpawnPacket()
pocketmine\entity\Entity::sendSpawnPacket |
( |
Player | $player | ) |
|
|
protectedinherited |
◆ setBaseDamage()
pocketmine\entity\projectile\Projectile::setBaseDamage |
( |
float | $damage | ) |
|
|
inherited |
Sets the base amount of damage applied by the projectile.
Definition at line 117 of file Projectile.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.
◆ setFallDistance()
pocketmine\entity\Entity::setFallDistance |
( |
float | $fallDistance | ) |
|
|
inherited |
◆ 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.
◆ setGravity()
pocketmine\entity\Entity::setGravity |
( |
float | $gravity | ) |
|
|
inherited |
◆ setHasGravity()
pocketmine\entity\Entity::setHasGravity |
( |
bool | $v = true | ) |
|
|
inherited |
◆ setHealth()
pocketmine\entity\Entity::setHealth |
( |
float | $amount | ) |
|
|
inherited |
◆ setInvisible()
pocketmine\entity\Entity::setInvisible |
( |
bool | $value = true | ) |
|
|
inherited |
◆ setLastDamageCause()
◆ setMaxHealth()
pocketmine\entity\Entity::setMaxHealth |
( |
int | $amount | ) |
|
|
inherited |
◆ setMotion()
pocketmine\entity\Entity::setMotion |
( |
Vector3 | $motion | ) |
|
|
inherited |
◆ setNameTag()
pocketmine\entity\Entity::setNameTag |
( |
string | $name | ) |
|
|
inherited |
◆ setNameTagAlwaysVisible()
pocketmine\entity\Entity::setNameTagAlwaysVisible |
( |
bool | $value = true | ) |
|
|
inherited |
◆ setNameTagVisible()
pocketmine\entity\Entity::setNameTagVisible |
( |
bool | $value = true | ) |
|
|
inherited |
◆ 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\Entity::setOnFire |
( |
int | $seconds | ) |
|
|
inherited |
◆ 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 |
◆ setPositionAndRotation()
pocketmine\entity\Entity::setPositionAndRotation |
( |
Vector3 | $pos, |
|
|
float | $yaw, |
|
|
float | $pitch ) |
|
protectedinherited |
◆ setRotation()
pocketmine\entity\Entity::setRotation |
( |
float | $yaw, |
|
|
float | $pitch ) |
|
inherited |
◆ setScale()
pocketmine\entity\Entity::setScale |
( |
float | $value | ) |
|
|
inherited |
◆ setScoreTag()
pocketmine\entity\Entity::setScoreTag |
( |
string | $score | ) |
|
|
inherited |
◆ setSilent()
pocketmine\entity\Entity::setSilent |
( |
bool | $value = true | ) |
|
|
inherited |
◆ setSize()
◆ 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\Entity::spawnTo |
( |
Player | $player | ) |
|
|
inherited |
◆ spawnToAll()
pocketmine\entity\Entity::spawnToAll |
( |
| ) |
|
|
inherited |
◆ syncNetworkData()
◆ teleport()
pocketmine\entity\Entity::teleport |
( |
Vector3 | $pos, |
|
|
?float | $yaw = null, |
|
|
?float | $pitch = null ) |
|
inherited |
◆ tryChangeMovement()
pocketmine\entity\Entity::tryChangeMovement |
( |
| ) |
|
|
protectedinherited |
◆ updateFallState()
pocketmine\entity\Entity::updateFallState |
( |
float | $distanceThisTick, |
|
|
bool | $onGround ) |
|
protectedinherited |
◆ updateMovement()
pocketmine\entity\Entity::updateMovement |
( |
bool | $teleport = false | ) |
|
|
protectedinherited |
◆ $alwaysShowNameTag
bool pocketmine\entity\Entity::$alwaysShowNameTag = false |
|
protectedinherited |
◆ $attributeMap
◆ $blockHit
Vector3 pocketmine\entity\projectile\Projectile::$blockHit = null |
|
protectedinherited |
◆ $blocksAround
array pocketmine\entity\Entity::$blocksAround = null |
|
protectedinherited |
◆ $boundingBox
◆ $canClimb
bool pocketmine\entity\Entity::$canClimb = false |
|
protectedinherited |
◆ $canClimbWalls
bool pocketmine\entity\Entity::$canClimbWalls = false |
|
protectedinherited |
◆ $closed
bool pocketmine\entity\Entity::$closed = false |
|
protectedinherited |
◆ $damage
float pocketmine\entity\projectile\Projectile::$damage = 0.0 |
|
protectedinherited |
◆ $drag
float pocketmine\entity\Entity::$drag |
|
protectedinherited |
◆ $fallDistance
float pocketmine\entity\Entity::$fallDistance = 0.0 |
|
inherited |
◆ $fireTicks
int pocketmine\entity\Entity::$fireTicks = 0 |
|
protectedinherited |
◆ $forceMovementUpdate
bool pocketmine\entity\Entity::$forceMovementUpdate = false |
|
protectedinherited |
◆ $gravity
float pocketmine\entity\Entity::$gravity |
|
protectedinherited |
◆ $gravityEnabled
bool pocketmine\entity\Entity::$gravityEnabled = true |
|
protectedinherited |
◆ $hasSpawned
array pocketmine\entity\Entity::$hasSpawned = [] |
|
protectedinherited |
◆ $id
int pocketmine\entity\Entity::$id |
|
protectedinherited |
◆ $invisible
bool pocketmine\entity\Entity::$invisible = false |
|
protectedinherited |
◆ $isCollided
bool pocketmine\entity\Entity::$isCollided = false |
|
inherited |
◆ $isCollidedHorizontally
bool pocketmine\entity\Entity::$isCollidedHorizontally = false |
|
inherited |
◆ $isCollidedVertically
bool pocketmine\entity\Entity::$isCollidedVertically = false |
|
inherited |
◆ $justCreated
bool pocketmine\entity\Entity::$justCreated = true |
|
protectedinherited |
◆ $keepMovement
bool pocketmine\entity\Entity::$keepMovement = false |
|
inherited |
◆ $lastDamageCause
◆ $lastLocation
Location pocketmine\entity\Entity::$lastLocation |
|
protectedinherited |
◆ $lastMotion
Vector3 pocketmine\entity\Entity::$lastMotion |
|
protectedinherited |
◆ $lastUpdate
int pocketmine\entity\Entity::$lastUpdate |
|
inherited |
◆ $location
Location pocketmine\entity\Entity::$location |
|
protectedinherited |
◆ $motion
Vector3 pocketmine\entity\Entity::$motion |
|
protectedinherited |
◆ $nameTag
string pocketmine\entity\Entity::$nameTag = "" |
|
protectedinherited |
◆ $nameTagVisible
bool pocketmine\entity\Entity::$nameTagVisible = true |
|
protectedinherited |
◆ $networkPropertiesDirty
bool pocketmine\entity\Entity::$networkPropertiesDirty = false |
|
protectedinherited |
◆ $noClientPredictions
bool pocketmine\entity\Entity::$noClientPredictions = false |
|
protectedinherited |
◆ $noDamageTicks
int pocketmine\entity\Entity::$noDamageTicks = 0 |
|
inherited |
◆ $onGround
bool pocketmine\entity\Entity::$onGround = false |
|
inherited |
◆ $ownerId
int pocketmine\entity\Entity::$ownerId = null |
|
protectedinherited |
◆ $scale
float pocketmine\entity\Entity::$scale = 1.0 |
|
protectedinherited |
◆ $scoreTag
string pocketmine\entity\Entity::$scoreTag = "" |
|
protectedinherited |
◆ $server
Server pocketmine\entity\Entity::$server |
|
protectedinherited |
◆ $silent
bool pocketmine\entity\Entity::$silent = false |
|
protectedinherited |
◆ $size
◆ $stepHeight
float pocketmine\entity\Entity::$stepHeight = 0.0 |
|
protectedinherited |
◆ $targetId
int pocketmine\entity\Entity::$targetId = null |
|
protectedinherited |
◆ $ticksLived
int pocketmine\entity\Entity::$ticksLived = 0 |
|
inherited |
◆ $timings
◆ $ySize
float pocketmine\entity\Entity::$ySize = 0.0 |
|
protectedinherited |
◆ MOTION_THRESHOLD
const pocketmine\entity\Entity::MOTION_THRESHOLD = 0.00001 |
|
inherited |
◆ STEP_CLIP_MULTIPLIER
const pocketmine\entity\Entity::STEP_CLIP_MULTIPLIER = 0.4 |
|
protectedinherited |
◆ TAG_MOTION
const pocketmine\entity\Entity::TAG_MOTION = "Motion" |
|
inherited |
◆ TAG_POS
const pocketmine\entity\Entity::TAG_POS = "Pos" |
|
inherited |
◆ TAG_ROTATION
const pocketmine\entity\Entity::TAG_ROTATION = "Rotation" |
|
inherited |
The documentation for this class was generated from the following file: