|
| | __construct (Location $location, Item $item, ?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 (int $cause=EntityExtinguishEvent::CAUSE_CUSTOM) |
| |
| | flagForDespawn () |
| |
| | getAttributeMap () |
| |
| | getBoundingBox () |
| |
| | getDespawnDelay () |
| |
| | getDirectionPlane () |
| |
| | getDirectionVector () |
| |
| | getEyeHeight () |
| |
| | getEyePos () |
| |
| | getFallDistance () |
| |
| | getFireTicks () |
| |
| | getGravity () |
| |
| | getHealth () |
| |
| | getHorizontalFacing () |
| |
| | getId () |
| |
| | getItem () |
| |
| | getLastDamageCause () |
| |
| | getLocation () |
| |
| | getMaxHealth () |
| |
| | getMotion () |
| |
| | getNameTag () |
| |
| | getNetworkProperties () |
| |
| | getNetworkTypeId () |
| |
| | getOffsetPosition (Vector3 $vector3) |
| |
| | getOwner () |
| |
| | getOwningEntity () |
| |
| | getOwningEntityId () |
| |
| | getPickedItem () |
| |
| | getPickupDelay () |
| |
| | getPosition () |
| |
| | getScale () |
| |
| | getScoreTag () |
| |
| | getSize () |
| |
| | getStepHeight () |
| |
| | getTargetEntity () |
| |
| | getTargetEntityId () |
| |
| | getThrower () |
| |
| | getViewers () |
| |
| | getWorld () |
| |
| | hasGravity () |
| |
| | hasMovementUpdate () |
| |
| | hasNoClientPredictions () |
| |
| | heal (EntityRegainHealthEvent $source) |
| |
| | isAlive () |
| |
| | isClosed () |
| |
| | isFireProof () |
| |
| | isFlaggedForDespawn () |
| |
| | isInsideOfSolid () |
| |
| | isInvisible () |
| |
| | isMergeable (ItemEntity $entity) |
| |
| | 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) |
| |
| | setOwner (string $owner) |
| |
| | setOwningEntity (?Entity $owner) |
| |
| | setPickupDelay (int $delay) |
| |
| | setRotation (float $yaw, float $pitch) |
| |
| | setScale (float $value) |
| |
| | setScoreTag (string $score) |
| |
| | setSilent (bool $value=true) |
| |
| | setStackSize (int $newCount) |
| |
| | setStepHeight (float $stepHeight) |
| |
| | setTargetEntity (?Entity $target) |
| |
| | setThrower (string $thrower) |
| |
| | spawnTo (Player $player) |
| |
| | spawnToAll () |
| |
| | teleport (Vector3 $pos, ?float $yaw=null, ?float $pitch=null) |
| |
| | tryMergeInto (ItemEntity $consumer) |
| |
|
| | 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 46 of file ItemEntity.php.
◆ __construct()
◆ __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\object\ItemEntity::applyDragBeforeGravity |
( |
| ) |
|
|
protected |
◆ 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 1736 of file Entity.php.
◆ canBeCollidedWith()
| pocketmine\entity\object\ItemEntity::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 375 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 390 of file Entity.php.
◆ canCollideWith()
| pocketmine\entity\object\ItemEntity::canCollideWith |
( |
Entity | $entity | ) |
|
◆ canSaveWithChunk()
| pocketmine\entity\object\ItemEntity::canSaveWithChunk |
( |
| ) |
|
◆ 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 1628 of file Entity.php.
◆ dealFireDamage()
| pocketmine\entity\Entity::dealFireDamage |
( |
| ) |
|
|
protectedinherited |
Called to deal damage to entities when they are on fire.
Definition at line 758 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 1575 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 1589 of file Entity.php.
◆ destroyCycles()
| pocketmine\entity\Entity::destroyCycles |
( |
| ) |
|
|
protectedinherited |
◆ doOnFireTick()
| pocketmine\entity\Entity::doOnFireTick |
( |
int | $tickDiff = 1 | ) |
|
|
protectedinherited |
◆ entityBaseTick()
| pocketmine\entity\object\ItemEntity::entityBaseTick |
( |
int | $tickDiff = 1 | ) |
|
|
protected |
◆ extinguish()
| pocketmine\entity\Entity::extinguish |
( |
int | $cause = EntityExtinguishEvent::CAUSE_CUSTOM | ) |
|
|
inherited |
◆ flagForDespawn()
| pocketmine\entity\Entity::flagForDespawn |
( |
| ) |
|
|
inherited |
Flags the entity to be removed from the world on the next tick.
Definition at line 1607 of file Entity.php.
◆ getAllNetworkData()
| pocketmine\entity\Entity::getAllNetworkData |
( |
| ) |
|
|
finalprotectedinherited |
- Returns
- MetadataProperty[] @phpstan-return array<int, MetadataProperty>
Definition at line 1694 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 1291 of file Entity.php.
◆ getBoundingBox()
| pocketmine\entity\Entity::getBoundingBox |
( |
| ) |
|
|
inherited |
◆ getDespawnDelay()
| pocketmine\entity\object\ItemEntity::getDespawnDelay |
( |
| ) |
|
Returns the number of ticks left before this item will despawn. If -1, the item will never despawn.
Definition at line 263 of file ItemEntity.php.
◆ 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 1682 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\ItemEntity::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 78 of file ItemEntity.php.
◆ getInitialGravity()
| pocketmine\entity\object\ItemEntity::getInitialGravity |
( |
| ) |
|
|
protected |
◆ getInitialSizeInfo()
| pocketmine\entity\object\ItemEntity::getInitialSizeInfo |
( |
| ) |
|
|
protected |
◆ getItem()
| pocketmine\entity\object\ItemEntity::getItem |
( |
| ) |
|
◆ 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()
| pocketmine\entity\object\ItemEntity::getNetworkTypeId |
( |
| ) |
|
◆ getOffsetPosition()
| pocketmine\entity\object\ItemEntity::getOffsetPosition |
( |
Vector3 | $vector3 | ) |
|
◆ getOwner()
| pocketmine\entity\object\ItemEntity::getOwner |
( |
| ) |
|
◆ 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 405 of file Entity.php.
◆ getPickedItem()
| pocketmine\entity\Entity::getPickedItem |
( |
| ) |
|
|
inherited |
◆ getPickupDelay()
| pocketmine\entity\object\ItemEntity::getPickupDelay |
( |
| ) |
|
◆ getPosition()
| pocketmine\entity\Entity::getPosition |
( |
| ) |
|
|
inherited |
◆ getScale()
| pocketmine\entity\Entity::getScale |
( |
| ) |
|
|
inherited |
◆ getScoreTag()
| pocketmine\entity\Entity::getScoreTag |
( |
| ) |
|
|
inherited |
◆ getSize()
| pocketmine\entity\Entity::getSize |
( |
| ) |
|
|
inherited |
◆ getStepHeight()
| pocketmine\entity\Entity::getStepHeight |
( |
| ) |
|
|
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 443 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 435 of file Entity.php.
◆ getThrower()
| pocketmine\entity\object\ItemEntity::getThrower |
( |
| ) |
|
◆ getViewers()
| pocketmine\entity\Entity::getViewers |
( |
| ) |
|
|
inherited |
◆ getWorld()
| pocketmine\entity\Entity::getWorld |
( |
| ) |
|
|
inherited |
◆ 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 337 of file Entity.php.
◆ heal()
◆ initEntity()
| pocketmine\entity\object\ItemEntity::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 1619 of file Entity.php.
◆ isFireProof()
| pocketmine\entity\object\ItemEntity::isFireProof |
( |
| ) |
|
◆ isFlaggedForDespawn()
| pocketmine\entity\Entity::isFlaggedForDespawn |
( |
| ) |
|
|
inherited |
◆ isInsideOfSolid()
| pocketmine\entity\Entity::isInsideOfSolid |
( |
| ) |
|
|
inherited |
◆ isInvisible()
| pocketmine\entity\Entity::isInvisible |
( |
| ) |
|
|
inherited |
◆ isMergeable()
| pocketmine\entity\object\ItemEntity::isMergeable |
( |
ItemEntity | $entity | ) |
|
Returns whether this item entity can merge with the given one.
Definition at line 175 of file ItemEntity.php.
◆ 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 105 of file Entity.php.
◆ onCollideWithPlayer()
| pocketmine\entity\object\ItemEntity::onCollideWithPlayer |
( |
Player | $player | ) |
|
◆ onDeath()
| pocketmine\entity\Entity::onDeath |
( |
| ) |
|
|
protectedinherited |
◆ onDeathUpdate()
| pocketmine\entity\Entity::onDeathUpdate |
( |
int | $tickDiff | ) |
|
|
protectedinherited |
◆ onDispose()
| pocketmine\entity\Entity::onDispose |
( |
| ) |
|
|
protectedinherited |
◆ onFirstUpdate()
| pocketmine\entity\object\ItemEntity::onFirstUpdate |
( |
int | $currentTick | ) |
|
|
protected |
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 from pocketmine\entity\Entity.
Definition at line 99 of file ItemEntity.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 1132 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 1055 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\ItemEntity::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 1671 of file Entity.php.
◆ sendSpawnPacket()
| pocketmine\entity\object\ItemEntity::sendSpawnPacket |
( |
Player | $player | ) |
|
|
protected |
◆ setCanClimb()
| pocketmine\entity\Entity::setCanClimb |
( |
bool | $value = true | ) |
|
|
inherited |
Sets whether the entity is able to climb climbable blocks.
Definition at line 382 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 397 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 474 of file Entity.php.
◆ setDespawnDelay()
| pocketmine\entity\object\ItemEntity::setDespawnDelay |
( |
int | $despawnDelay | ) |
|
◆ setFallDistance()
| pocketmine\entity\Entity::setFallDistance |
( |
float | $fallDistance | ) |
|
|
inherited |
◆ setFireTicks()
| pocketmine\entity\Entity::setFireTicks |
( |
int | $fireTicks | ) |
|
|
inherited |
- Exceptions
-
InvalidArgumentException
Definition at line 705 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 1063 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 349 of file Entity.php.
◆ setOnFire()
| pocketmine\entity\Entity::setOnFire |
( |
int | $seconds | ) |
|
|
inherited |
◆ setOwner()
| pocketmine\entity\object\ItemEntity::setOwner |
( |
string | $owner | ) |
|
◆ 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 421 of file Entity.php.
◆ setPickupDelay()
| pocketmine\entity\object\ItemEntity::setPickupDelay |
( |
int | $delay | ) |
|
◆ 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()
◆ setStackSize()
| pocketmine\entity\object\ItemEntity::setStackSize |
( |
int | $newCount | ) |
|
◆ setStepHeight()
| pocketmine\entity\Entity::setStepHeight |
( |
float | $stepHeight | ) |
|
|
inherited |
◆ 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 452 of file Entity.php.
◆ setThrower()
| pocketmine\entity\object\ItemEntity::setThrower |
( |
string | $thrower | ) |
|
◆ 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\object\ItemEntity::tryChangeMovement |
( |
| ) |
|
|
protected |
◆ tryMergeInto()
| pocketmine\entity\object\ItemEntity::tryMergeInto |
( |
ItemEntity | $consumer | ) |
|
Attempts to merge this item entity into the given item entity. Returns true if it was successful.
Definition at line 186 of file ItemEntity.php.
◆ 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 |
◆ $despawnDelay
| int pocketmine\entity\object\ItemEntity::$despawnDelay = self::DEFAULT_DESPAWN_DELAY |
|
protected |
◆ $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 |
◆ $item
| Item pocketmine\entity\object\ItemEntity::$item |
|
protected |
◆ $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 |
◆ $owner
| string pocketmine\entity\object\ItemEntity::$owner = "" |
|
protected |
◆ $ownerId
| int pocketmine\entity\Entity::$ownerId = null |
|
protectedinherited |
◆ $pickupDelay
| int pocketmine\entity\object\ItemEntity::$pickupDelay = 0 |
|
protected |
◆ $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 |
◆ $thrower
| string pocketmine\entity\object\ItemEntity::$thrower = "" |
|
protected |
◆ $ticksLived
| int pocketmine\entity\Entity::$ticksLived = 0 |
|
inherited |
◆ $timings
◆ $ySize
| float pocketmine\entity\Entity::$ySize = 0.0 |
|
protectedinherited |
◆ DEFAULT_DESPAWN_DELAY
| const pocketmine\entity\object\ItemEntity::DEFAULT_DESPAWN_DELAY = 6000 |
◆ MAX_DESPAWN_DELAY
| const pocketmine\entity\object\ItemEntity::MAX_DESPAWN_DELAY = 32767 + self::DEFAULT_DESPAWN_DELAY |
◆ MERGE_CHECK_PERIOD
| const pocketmine\entity\object\ItemEntity::MERGE_CHECK_PERIOD = 2 |
◆ MOTION_THRESHOLD
| const pocketmine\entity\Entity::MOTION_THRESHOLD = 0.00001 |
|
inherited |
◆ NEVER_DESPAWN
| const pocketmine\entity\object\ItemEntity::NEVER_DESPAWN = -1 |
◆ STEP_CLIP_MULTIPLIER
| const pocketmine\entity\Entity::STEP_CLIP_MULTIPLIER = 0.4 |
|
protectedinherited |
◆ TAG_ITEM
| const pocketmine\entity\object\ItemEntity::TAG_ITEM = "Item" |
◆ 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: