|
| __construct (Location $location, int $xpValue, ?CompoundTag $nbt=null) |
|
| __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 () |
|
| getBoundingBox () |
|
| getDespawnDelay () |
|
| getDirectionPlane () |
|
| getDirectionVector () |
|
| getEyeHeight () |
|
| getEyePos () |
|
| getFallDistance () |
|
| getFireTicks () |
|
| getGravity () |
|
| getHealth () |
|
| getHorizontalFacing () |
|
| getId () |
|
| getLastDamageCause () |
|
| getLocation () |
|
| getMaxHealth () |
|
| getMotion () |
|
| getNameTag () |
|
| getNetworkProperties () |
|
| getOffsetPosition (Vector3 $vector3) |
|
| getOwningEntity () |
|
| getOwningEntityId () |
|
| getPickedItem () |
|
| getPosition () |
|
| getScale () |
|
| getScoreTag () |
|
| getSize () |
|
| getTargetEntity () |
|
| getTargetEntityId () |
|
| getTargetPlayer () |
|
| getViewers () |
|
| getWorld () |
|
| getXpValue () |
|
| hasGravity () |
|
| hasMovementUpdate () |
|
| hasNoClientPredictions () |
|
| hasTargetPlayer () |
|
| heal (EntityRegainHealthEvent $source) |
|
| isAlive () |
|
| isClosed () |
|
| isFireProof () |
|
| isFlaggedForDespawn () |
|
| isInsideOfSolid () |
|
| isInvisible () |
|
| isNameTagAlwaysVisible () |
|
| isNameTagVisible () |
|
| isOnFire () |
|
| isOnGround () |
|
| isSilent () |
|
| isUnderwater () |
|
| kill () |
|
| onCollideWithPlayer (Player $player) |
|
| onInteract (Player $player, Vector3 $clickPos) |
|
| onNearbyBlockChange () |
|
| onRandomUpdate () |
|
| onUpdate (int $currentTick) |
|
| resetFallDistance () |
|
| respawnToAll () |
|
| saveNBT () |
|
| scheduleUpdate () |
|
| sendData (?array $targets, ?array $data=null) |
|
| setCanClimb (bool $value=true) |
|
| setCanClimbWalls (bool $value=true) |
|
| setCanSaveWithChunk (bool $value) |
|
| setDespawnDelay (int $despawnDelay) |
|
| 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) |
|
| setTargetPlayer (?Human $player) |
|
| setXpValue (int $amount) |
|
| spawnTo (Player $player) |
|
| spawnToAll () |
|
| teleport (Vector3 $pos, ?float $yaw=null, ?float $pitch=null) |
|
|
AxisAlignedBB | $boundingBox |
|
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_DESPAWN_DELAY = 6000 |
|
const | MAX_DESPAWN_DELAY = 32767 + self::DEFAULT_DESPAWN_DELAY |
|
const | MAX_TARGET_DISTANCE = 8.0 |
|
const | MOTION_THRESHOLD = 0.00001 |
|
const | NEVER_DESPAWN = -1 |
|
const | ORB_SPLIT_SIZES = [2477, 1237, 617, 307, 149, 73, 37, 17, 7, 3, 1] |
|
const | TAG_MOTION = "Motion" |
|
const | TAG_POS = "Pos" |
|
const | TAG_ROTATION = "Rotation" |
|
const | TAG_VALUE_PC = "Value" |
|
const | TAG_VALUE_PE = "experience value" |
|
|
| addAttributes () |
|
| applyDragBeforeGravity () |
|
| broadcastMotion () |
|
| broadcastMovement (bool $teleport=false) |
|
| 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) |
|
| 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) |
|
Definition at line 38 of file ExperienceOrb.php.
◆ __construct()
pocketmine\entity\object\ExperienceOrb::__construct |
( |
Location | $location, |
|
|
int | $xpValue, |
|
|
?CompoundTag | $nbt = null ) |
◆ __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\Entity::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 1705 of file Entity.php.
◆ canBeCollidedWith()
pocketmine\entity\object\ExperienceOrb::canBeCollidedWith |
( |
| ) |
|
◆ 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 371 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 386 of file Entity.php.
◆ canCollideWith()
pocketmine\entity\Entity::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 1597 of file Entity.php.
◆ dealFireDamage()
pocketmine\entity\Entity::dealFireDamage |
( |
| ) |
|
|
protectedinherited |
Called to deal damage to entities when they are on fire.
Definition at line 744 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 1544 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 1558 of file Entity.php.
◆ destroyCycles()
pocketmine\entity\Entity::destroyCycles |
( |
| ) |
|
|
protectedinherited |
◆ doOnFireTick()
pocketmine\entity\Entity::doOnFireTick |
( |
int | $tickDiff = 1 | ) |
|
|
protectedinherited |
◆ entityBaseTick()
pocketmine\entity\object\ExperienceOrb::entityBaseTick |
( |
int | $tickDiff = 1 | ) |
|
|
protected |
◆ 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 1576 of file Entity.php.
◆ getAllNetworkData()
pocketmine\entity\Entity::getAllNetworkData |
( |
| ) |
|
|
finalprotectedinherited |
- Returns
- MetadataProperty[] @phpstan-return array<int, MetadataProperty>
Definition at line 1663 of file Entity.php.
◆ getAttributeMap()
pocketmine\entity\Entity::getAttributeMap |
( |
| ) |
|
|
inherited |
◆ 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 1267 of file Entity.php.
◆ getBoundingBox()
pocketmine\entity\Entity::getBoundingBox |
( |
| ) |
|
|
inherited |
◆ getDespawnDelay()
pocketmine\entity\object\ExperienceOrb::getDespawnDelay |
( |
| ) |
|
◆ 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 1651 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\object\ExperienceOrb::getInitialDragMultiplier |
( |
| ) |
|
|
protected |
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 104 of file ExperienceOrb.php.
◆ getInitialGravity()
pocketmine\entity\object\ExperienceOrb::getInitialGravity |
( |
| ) |
|
|
protected |
◆ getInitialSizeInfo()
pocketmine\entity\object\ExperienceOrb::getInitialSizeInfo |
( |
| ) |
|
|
protected |
◆ getLastDamageCause()
pocketmine\entity\Entity::getLastDamageCause |
( |
| ) |
|
|
inherited |
◆ getLocation()
pocketmine\entity\Entity::getLocation |
( |
| ) |
|
|
inherited |
◆ getMaxHealth()
pocketmine\entity\Entity::getMaxHealth |
( |
| ) |
|
|
inherited |
◆ getMaxOrbSize()
static pocketmine\entity\object\ExperienceOrb::getMaxOrbSize |
( |
int | $amount | ) |
|
|
static |
Returns the largest size of normal XP orb that will be spawned for the specified amount of XP. Used to split XP up into multiple orbs when an amount of XP is dropped.
Definition at line 60 of file ExperienceOrb.php.
◆ getMotion()
pocketmine\entity\Entity::getMotion |
( |
| ) |
|
|
inherited |
◆ getNameTag()
pocketmine\entity\Entity::getNameTag |
( |
| ) |
|
|
inherited |
◆ getNetworkProperties()
pocketmine\entity\Entity::getNetworkProperties |
( |
| ) |
|
|
inherited |
◆ getNetworkTypeId()
static pocketmine\entity\object\ExperienceOrb::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 401 of file Entity.php.
◆ getPickedItem()
pocketmine\entity\Entity::getPickedItem |
( |
| ) |
|
|
inherited |
◆ getPosition()
pocketmine\entity\Entity::getPosition |
( |
| ) |
|
|
inherited |
◆ 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 439 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 431 of file Entity.php.
◆ getTargetPlayer()
pocketmine\entity\object\ExperienceOrb::getTargetPlayer |
( |
| ) |
|
◆ getViewers()
pocketmine\entity\Entity::getViewers |
( |
| ) |
|
|
inherited |
◆ getWorld()
pocketmine\entity\Entity::getWorld |
( |
| ) |
|
|
inherited |
◆ getXpValue()
pocketmine\entity\object\ExperienceOrb::getXpValue |
( |
| ) |
|
◆ hasGravity()
pocketmine\entity\Entity::hasGravity |
( |
| ) |
|
|
inherited |
◆ hasMovementUpdate()
pocketmine\entity\Entity::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 333 of file Entity.php.
◆ hasTargetPlayer()
pocketmine\entity\object\ExperienceOrb::hasTargetPlayer |
( |
| ) |
|
◆ heal()
◆ initEntity()
pocketmine\entity\object\ExperienceOrb::initEntity |
( |
CompoundTag | $nbt | ) |
|
|
protected |
◆ isAlive()
pocketmine\entity\Entity::isAlive |
( |
| ) |
|
|
inherited |
◆ isClosed()
pocketmine\entity\Entity::isClosed |
( |
| ) |
|
|
inherited |
Returns whether the entity has been "closed".
Definition at line 1588 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\Entity::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 964 of file Entity.php.
◆ 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 1118 of file Entity.php.
◆ onNearbyBlockChange()
pocketmine\entity\Entity::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 1041 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\object\ExperienceOrb::saveNBT |
( |
| ) |
|
◆ 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 1640 of file Entity.php.
◆ sendSpawnPacket()
pocketmine\entity\Entity::sendSpawnPacket |
( |
Player | $player | ) |
|
|
protectedinherited |
◆ setCanClimb()
pocketmine\entity\Entity::setCanClimb |
( |
bool | $value = true | ) |
|
|
inherited |
Sets whether the entity is able to climb climbable blocks.
Definition at line 378 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 393 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 470 of file Entity.php.
◆ setDespawnDelay()
pocketmine\entity\object\ExperienceOrb::setDespawnDelay |
( |
int | $despawnDelay | ) |
|
◆ setFallDistance()
pocketmine\entity\Entity::setFallDistance |
( |
float | $fallDistance | ) |
|
|
inherited |
◆ setFireTicks()
pocketmine\entity\Entity::setFireTicks |
( |
int | $fireTicks | ) |
|
|
inherited |
- Exceptions
-
InvalidArgumentException
Definition at line 701 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 1049 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 345 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 417 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 448 of file Entity.php.
◆ setTargetPlayer()
pocketmine\entity\object\ExperienceOrb::setTargetPlayer |
( |
?Human | $player | ) |
|
◆ setXpValue()
pocketmine\entity\object\ExperienceOrb::setXpValue |
( |
int | $amount | ) |
|
◆ spawnTo()
pocketmine\entity\Entity::spawnTo |
( |
Player | $player | ) |
|
|
inherited |
◆ spawnToAll()
pocketmine\entity\Entity::spawnToAll |
( |
| ) |
|
|
inherited |
◆ splitIntoOrbSizes()
static pocketmine\entity\object\ExperienceOrb::splitIntoOrbSizes |
( |
int | $amount | ) |
|
|
static |
Splits the specified amount of XP into an array of acceptable XP orb sizes.
- Returns
- int[]
Definition at line 75 of file ExperienceOrb.php.
◆ syncNetworkData()
◆ teleport()
pocketmine\entity\Entity::teleport |
( |
Vector3 | $pos, |
|
|
?float | $yaw = null, |
|
|
?float | $pitch = null ) |
|
inherited |
◆ tryChangeMovement()
pocketmine\entity\object\ExperienceOrb::tryChangeMovement |
( |
| ) |
|
|
protected |
◆ 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
◆ $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 |
◆ $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 |
◆ $lookForTargetTime
int pocketmine\entity\object\ExperienceOrb::$lookForTargetTime = 0 |
|
protected |
Ticker used for determining interval in which to look for new target players.
Definition at line 88 of file ExperienceOrb.php.
◆ $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 |
◆ $targetPlayerRuntimeId
int pocketmine\entity\object\ExperienceOrb::$targetPlayerRuntimeId = null |
|
protected |
Runtime entity ID of the player this XP orb is targeting.
Definition at line 91 of file ExperienceOrb.php.
◆ $ticksLived
int pocketmine\entity\Entity::$ticksLived = 0 |
|
inherited |
◆ $timings
◆ $xpValue
int pocketmine\entity\object\ExperienceOrb::$xpValue |
|
protected |
◆ $ySize
float pocketmine\entity\Entity::$ySize = 0.0 |
|
protectedinherited |
◆ DEFAULT_DESPAWN_DELAY
const pocketmine\entity\object\ExperienceOrb::DEFAULT_DESPAWN_DELAY = 6000 |
◆ MAX_DESPAWN_DELAY
const pocketmine\entity\object\ExperienceOrb::MAX_DESPAWN_DELAY = 32767 + self::DEFAULT_DESPAWN_DELAY |
◆ MAX_TARGET_DISTANCE
const pocketmine\entity\object\ExperienceOrb::MAX_TARGET_DISTANCE = 8.0 |
Max distance an orb will follow a player across.
Definition at line 47 of file ExperienceOrb.php.
◆ MOTION_THRESHOLD
const pocketmine\entity\Entity::MOTION_THRESHOLD = 0.00001 |
|
inherited |
◆ NEVER_DESPAWN
const pocketmine\entity\object\ExperienceOrb::NEVER_DESPAWN = -1 |
◆ ORB_SPLIT_SIZES
const pocketmine\entity\object\ExperienceOrb::ORB_SPLIT_SIZES = [2477, 1237, 617, 307, 149, 73, 37, 17, 7, 3, 1] |
Split sizes used for dropping experience orbs.
Definition at line 50 of file ExperienceOrb.php.
◆ 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 |
◆ TAG_VALUE_PC
const pocketmine\entity\object\ExperienceOrb::TAG_VALUE_PC = "Value" |
◆ TAG_VALUE_PE
const pocketmine\entity\object\ExperienceOrb::TAG_VALUE_PE = "experience value" |
The documentation for this class was generated from the following file: