Entity
Constants
BLOCK_FLAG_BUBBLE_COLUMN 5.46.0 protected
protected const BLOCK_FLAG_BUBBLE_COLUMN = 4BLOCK_FLAG_POWDER_SNOW 5.46.0 protected
protected const BLOCK_FLAG_POWDER_SNOW = 8BLOCK_FLAG_SOLID_OPAQUE 5.46.0 protected
protected const BLOCK_FLAG_SOLID_OPAQUE = 1BLOCK_FLAG_WATER 5.46.0 protected
protected const BLOCK_FLAG_WATER = 2MAX_COMMAND_TAGS 5.46.0
public const MAX_COMMAND_TAGS = 1024Most tags an entity can have (/tag add fails beyond this, like Bedrock).
MOTION_THRESHOLD
public const MOTION_THRESHOLD = 1.0E-5SEATED_EYE_HEIGHT_FACTOR 5.46.0 protected
protected const SEATED_EYE_HEIGHT_FACTOR = 0.75308642Vertical offset of a passenger's position from its seat sent to clients: players are placed with their eyes (their network position) at 0.753 of their standing eye height above the seat, mobs with their feet a quarter of their height below it (same values as PowerNukkitX, which match vanilla).
STEP_CLIP_MULTIPLIER protected
protected const STEP_CLIP_MULTIPLIER = 0.4TAG_LINKS 5.46.0
public const TAG_LINKS = "LinksTag"TAG_LINK_ENTITY_ID 5.46.0
public const TAG_LINK_ENTITY_ID = "entityID"TAG_LINK_ID 5.46.0
public const TAG_LINK_ID = "linkID"TAG_MOTION
public const TAG_MOTION = "Motion"TAG_POS
public const TAG_POS = "Pos"TAG_ROTATION
public const TAG_ROTATION = "Rotation"TAG_UNIQUE_ID 5.46.0
public const TAG_UNIQUE_ID = "UniqueID"Properties
$alwaysShowNameTag protected
protected bool $alwaysShowNameTag$attributeMap protected
protected \pocketmine\entity\AttributeMap $attributeMap$blocksAround protected
protected ?array $blocksAround$boundingBox
public \pocketmine\math\AxisAlignedBB $boundingBox$canClimb protected
protected bool $canClimb$canClimbWalls protected
protected bool $canClimbWalls$closed protected
protected bool $closed$drag protected
protected float $drag$fallDistance
public float $fallDistance$fireTicks protected
protected int $fireTicks$forceMovementUpdate protected
protected bool $forceMovementUpdate$gravity protected
protected float $gravity$gravityEnabled protected
protected bool $gravityEnabled$hasSpawned protected
protected array $hasSpawned$id protected
protected int $id$invisible protected
protected bool $invisible$isCollided
public bool $isCollided$isCollidedHorizontally
public bool $isCollidedHorizontally$isCollidedVertically
public bool $isCollidedVertically$justCreated protected
protected bool $justCreated$keepMovement
public bool $keepMovement$lastDamageCause protected
protected ?\pocketmine\event\entity\EntityDamageEvent $lastDamageCause$lastLocation protected
protected \pocketmine\entity\Location $lastLocation$lastMotion protected
protected \pocketmine\math\Vector3 $lastMotion$lastUpdate
public int $lastUpdate$location protected
protected \pocketmine\entity\Location $location$motion protected
protected \pocketmine\math\Vector3 $motion$nameTag protected
protected string $nameTag$nameTagVisible protected
protected bool $nameTagVisible$networkPropertiesDirty protected
protected bool $networkPropertiesDirty$noClientPredictions protected
protected bool $noClientPredictions$noDamageTicks
public int $noDamageTicks$onGround
public bool $onGround$ownerId protected
protected ?int $ownerId$passengers 5.46.0 protected
protected array $passengersEntities riding this one, by seat. The first one is the rider (it may control the vehicle).
$scale protected
protected float $scale$scoreTag protected
protected string $scoreTag$server protected
protected \pocketmine\Server $server$silent protected
protected bool $silent$size
public \pocketmine\entity\EntitySizeInfo $size$stepHeight protected
protected float $stepHeight$targetId protected
protected ?int $targetId$ticksLived
public int $ticksLived$timings protected
protected \pocketmine\timings\TimingsHandler $timings$vehicle 5.46.0 protected
protected ?\pocketmine\entity\Entity $vehicleThe entity this entity is riding.
$viewerSendIds 5.46.0 protected
protected array $viewerSendIds$ySize protected
protected float $ySizeMethods
__construct()
public function __construct(\pocketmine\entity\Location $location, ?\pocketmine\nbt\tag\CompoundTag $nbt = null)__destruct()
public function __destruct()__toString()
public function __toString()addAttributes() protected
protected function addAttributes() : voidaddCommandTag() 5.46.0
public function addCommandTag(string $tag) : boolAdds a command tag. Returns false if the entity already has it, the tag is empty, or the entity has MAX_COMMAND_TAGS tags.
addMotion()
public function addMotion(float $x, float $y, float $z) : voidAdds the given values to the entity's motion vector.
applyDragBeforeGravity() protected
protected function applyDragBeforeGravity() : boolattack()
public function attack(\pocketmine\event\entity\EntityDamageEvent $source) : voidblockFlagsAt() 5.46.0 protected
protected static function blockFlagsAt(\pocketmine\world\World $world, int $x, int $y, int $z) : intReturns the BLOCK_FLAG_* of the block at the given position (0 outside the world and in unloaded chunks, like the air World::getBlockAt() returns there), without building the block.
broadcastAnimation()
public function broadcastAnimation(\pocketmine\entity\animation\Animation $animation, ?array $targets = null) : voidbroadcastMotion() protected
protected function broadcastMotion() : voidbroadcastMovement() protected
protected function broadcastMovement(bool $teleport = false) : voidbroadcastSound()
public function broadcastSound(\pocketmine\world\sound\Sound $sound, ?array $targets = null) : voidBroadcasts a sound caused by the entity. If the entity is considered "silent", the sound will be dropped.
canAddPassenger() 5.46.0
public function canAddPassenger(\pocketmine\entity\Entity $entity) : boolReturns whether the given entity may get on this one now: it is allowed to ride it and a seat is free.
canBeCollidedWith()
public function canBeCollidedWith() : boolcanBeMovedByCurrents()
public function canBeMovedByCurrents() : boolReturns whether this entity can be moved by currents in liquids.
canBeRenamed()
public function canBeRenamed() : boolReturns whether players can rename this entity using a name tag. Note that plugins can still name entities using setNameTag().
canBeRiddenBy() 5.46.0
public function canBeRiddenBy(\pocketmine\entity\Entity $entity) : boolReturns whether the given entity may ride this one (the vanilla "family_types" of the rideable component, a saddle...). Free seats are checked by Entity::canAddPassenger().
canBeStoodOn() 5.46.0
public function canBeStoodOn() : boolReturns whether players can stand on top of this entity as if it was a block (Bedrock is_collidable, shown to clients with the COLLIDABLE metadata flag). Players standing on it are on the ground: their falls end there.
canClimb()
public function canClimb() : boolReturns whether the entity is able to climb blocks such as ladders or vines.
canClimbWalls()
public function canClimbWalls() : boolReturns 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.
canCollideWith()
public function canCollideWith(\pocketmine\entity\Entity $entity) : boolcanSaveWithChunk()
public function canSaveWithChunk() : boolReturns whether this entity will be saved when its chunk is unloaded.
checkBlockIntersections() protected
protected function checkBlockIntersections() : voidcheckGroundState() protected
protected function checkGroundState(float $wantedX, float $wantedY, float $wantedZ, float $dx, float $dy, float $dz) : voidcheckObstruction() protected
protected function checkObstruction(float $x, float $y, float $z) : boolclose()
final public function close() : voidCloses the entity and frees attached references.
WARNING: Entities are unusable after this has been executed!
createMovementPacket() 5.46.0 protected
protected function createMovementPacket() : \pocketmine\network\mcpe\protocol\MoveActorAbsolutePacketdealFireDamage() protected
protected function dealFireDamage() : voidCalled to deal damage to entities when they are on fire.
despawnFrom()
public function despawnFrom(\pocketmine\player\Player $player, bool $send = true) : voidDeprecated
WARNING: This function DOES NOT permanently hide the entity from the player. As soon as the entity or
despawnFromAll()
public function despawnFromAll() : voidDeprecated
WARNING: This function DOES NOT permanently hide the entity from viewers. As soon as the entity or
destroyCycles() protected
protected function destroyCycles() : voidCalled 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.
dismount() 5.46.0
public function dismount(bool $force = false, bool $causedByRider = false) : boolGets this entity off its vehicle, beside it. Unless forced, the EntityDismountEvent may refuse it. Returns whether the entity got off.
doOnFireTick() protected
protected function doOnFireTick(int $tickDiff = 1) : boolejectPassengers() 5.46.0
public function ejectPassengers(bool $reposition = true) : voidGets every passenger off this entity (forced dismounts).
entityBaseTick() protected
protected function entityBaseTick(int $tickDiff = 1) : boolextinguish()
public function extinguish(int $cause = \pocketmine\event\entity\EntityExtinguishEvent::CAUSE_CUSTOM) : voidflagForDespawn()
public function flagForDespawn() : voidFlags the entity to be removed from the world on the next tick.
getAllNetworkData() protected
final protected function getAllNetworkData() : arraygetAttributeMap()
public function getAttributeMap() : \pocketmine\entity\AttributeMapgetBlocksAroundWithEntityInsideActions() protected
protected function getBlocksAroundWithEntityInsideActions() : arraygetBlocksIntersected() protected
protected function getBlocksIntersected(float $inset) : \GeneratorYields all the blocks whose full-cube areas are intersected by the entity's AABB.
getBoundingBox()
public function getBoundingBox() : \pocketmine\math\AxisAlignedBBgetCommandTags() 5.46.0
public function getCommandTags() : arrayReturns the command tags of this entity (Bedrock /tag; selected with @e[tag=...]). They are saved with the entity.
getControllingPassenger() 5.46.0
public function getControllingPassenger() : ?\pocketmine\entity\EntityReturns the passenger on the first seat, which controls the vehicle if it can, or null.
getDirectionPlane()
public function getDirectionPlane() : \pocketmine\math\Vector2getDirectionVector()
public function getDirectionVector() : \pocketmine\math\Vector3getDirtyNetworkData() protected
final protected function getDirtyNetworkData() : arraygetDismountPosition() 5.46.0
public function getDismountPosition(\pocketmine\entity\Entity $passenger) : \pocketmine\math\Vector3Returns where a passenger is put when it gets off: the first free spot with ground beside this entity (left, right, back, front), or on top of it.
getEyeHeight()
public function getEyeHeight() : floatgetEyePos()
public function getEyePos() : \pocketmine\math\Vector3getFallDistance()
public function getFallDistance() : floatgetFireTicks()
public function getFireTicks() : intgetGravity()
public function getGravity() : floatgetHeadYaw() 5.46.0
public function getHeadYaw() : floatReturns the yaw of the entity's head sent to clients. Only mobs turn their head independently of their body.
getHealth()
public function getHealth() : floatgetHorizontalFacing()
public function getHorizontalFacing() : intgetId()
public function getId() : intgetInitialDragMultiplier() protected
abstract protected function getInitialDragMultiplier() : floatReturns 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.
getInitialGravity() protected
abstract protected function getInitialGravity() : floatReturns the downwards acceleration of the entity when falling, in blocks/tick².
getInitialSizeInfo() protected
abstract protected function getInitialSizeInfo() : \pocketmine\entity\EntitySizeInfogetInteractButtonText() 5.46.0
public function getInteractButtonText(\pocketmine\player\Player $player) : stringReturns the text of the interaction button shown to a touch player pointing at this entity (vanilla interact_text, e.g. "action.interact.ride.horse"), or "" for none.
getLastDamageCause()
public function getLastDamageCause() : ?\pocketmine\event\entity\EntityDamageEventgetLocation()
public function getLocation() : \pocketmine\entity\LocationgetMaxHealth()
public function getMaxHealth() : intgetMotion()
public function getMotion() : \pocketmine\math\Vector3getNameTag()
public function getNameTag() : stringgetNetworkProperties()
public function getNetworkProperties() : \pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollectiongetNetworkSyncedProperties() 5.46.0
public function getNetworkSyncedProperties() : \pocketmine\network\mcpe\protocol\types\entity\PropertySyncDataReturns the actor property values sent to clients with the entity's metadata (see \pocketmine\entity\property\EntityPropertyRegistry). Most entities have none.
getNetworkTypeId()
abstract public static function getNetworkTypeId() : stringgetOffsetPosition()
public function getOffsetPosition(\pocketmine\math\Vector3 $vector3) : \pocketmine\math\Vector3getOwningEntity()
public function getOwningEntity() : ?\pocketmine\entity\EntityReturns the owning entity, or null if the entity was not found.
getOwningEntityId()
public function getOwningEntityId() : ?intReturns the entity ID of the owning entity, or null if the entity doesn't have an owner.
getPassengerPosition() 5.46.0
public function getPassengerPosition(\pocketmine\entity\Entity $passenger) : \pocketmine\math\Vector3Returns where a passenger of this entity is in the world (its feet): its seat offset rotated by this entity's yaw.
getPassengerSeatOffset() 5.46.0
public function getPassengerSeatOffset(\pocketmine\entity\Entity $passenger) : \pocketmine\math\Vector3Returns the position of a passenger relative to this entity, as sent to clients (RIDER_SEAT_POSITION): its seat (before rotating by the vehicle's yaw) raised by the passenger's Entity::getSeatedHeightOffset().
getPassengers() 5.46.0
public function getPassengers() : arrayReturns the entities riding this one, by seat (the first one is the rider).
getPersistentUniqueId() 5.46.0
public function getPersistentUniqueId() : intReturns the persistent ID of this entity (vanilla "UniqueID"), assigning a random one the first time. It is only saved once assigned, which happens to the vehicles and passengers of saved links (see Entity::mount()).
getPickedItem()
public function getPickedItem() : ?\pocketmine\item\ItemReturns the item that players will equip when middle-clicking on this entity.
getPosition()
public function getPosition() : \pocketmine\world\PositiongetRideableSeats() 5.46.0
public function getRideableSeats() : arrayReturns the seats of this entity in its current state (vanilla minecraft:rideable component), by seat order. An entity with no seats can't be ridden.
getScale()
public function getScale() : floatgetScoreTag()
public function getScoreTag() : ?stringgetSeatOf() 5.46.0
public function getSeatOf(\pocketmine\entity\Entity $passenger) : ?\pocketmine\entity\riding\RideableSeatReturns the seat of a passenger of this entity, or null if it isn't one.
getSeatedHeightOffset() 5.46.0
public function getSeatedHeightOffset() : floatReturns the height of this entity's network position above its seat when riding something: mobs have their feet a quarter of their height below the seat (players override this).
getSize()
public function getSize() : \pocketmine\entity\EntitySizeInfogetSpawnLinks() 5.46.0 protected
protected function getSpawnLinks(\pocketmine\player\Player $player) : arrayReturns the links to this entity's passengers that the given player already sees, sent with the spawn packet. Passengers spawned later send their own link (see Entity::spawnTo()).
getStepHeight()
public function getStepHeight() : floatgetTargetEntity()
public function getTargetEntity() : ?\pocketmine\entity\EntityReturns 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.
getTargetEntityId()
public function getTargetEntityId() : ?intReturns the entity ID of the entity's target, or null if it doesn't have a target.
getVehicle() 5.46.0
public function getVehicle() : ?\pocketmine\entity\EntityReturns the entity this entity is riding, if any.
getViewers()
public function getViewers() : arraygetWorld()
public function getWorld() : \pocketmine\world\WorldgivesUnderwaterBreathingTo() 5.46.0
public function givesUnderwaterBreathingTo(\pocketmine\entity\Entity $passenger) : boolReturns whether the given passenger of this entity can breathe underwater while riding it (vanilla underwater_mount_breathing, e.g. a saddled nautilus in water).
handleClientVehicleMovement() 5.46.0
public function handleClientVehicleMovement(\pocketmine\player\Player $rider, \pocketmine\math\Vector3 $pos, float $yaw, float $pitch) : boolCalled when the client of the rider moved this vehicle itself (client-predicted vehicles like horses), with the vehicle's new position (feet) and rotation. Returns false if the movement was refused; the vehicle is then sent back to its position.
handleRiderInput() 5.46.0
public function handleRiderInput(\pocketmine\player\Player $rider, \pocketmine\entity\riding\RiderInput $input) : voidCalled every tick with the input of the player controlling this vehicle (its rider). Vehicles steered by their rider override this.
hasCommandTag() 5.46.0
public function hasCommandTag(string $tag) : boolhasGravity()
public function hasGravity() : boolhasMovementUpdate()
public function hasMovementUpdate() : boolReturns whether the entity needs a movement update on the next tick.
hasNoClientPredictions()
public function hasNoClientPredictions() : boolReturns whether clients may predict this entity's behaviour and movement. Used for things like water movement, burning, and movement smoothing (interpolation).
hasPassenger() 5.46.0
public function hasPassenger(\pocketmine\entity\Entity $entity) : boolheal()
public function heal(\pocketmine\event\entity\EntityRegainHealthEvent $source) : voidinitEntity() protected
protected function initEntity(\pocketmine\nbt\tag\CompoundTag $nbt) : voidisAlive()
public function isAlive() : boolisClosed()
public function isClosed() : boolReturns whether the entity has been "closed".
isFireProof()
public function isFireProof() : boolisFlaggedForDespawn()
public function isFlaggedForDespawn() : boolisInRain() 5.46.0
public function isInRain() : boolReturns whether rain falls on the entity: it rains in the world and rain (not snow) reaches its feet or the top of its bounding box under the open sky (see \pocketmine\world\weather\Weather::isRainingAt()).
isInsideOfSolid()
public function isInsideOfSolid() : boolisInvisible()
public function isInvisible() : boolisNameTagAlwaysVisible()
public function isNameTagAlwaysVisible() : boolisNameTagVisible()
public function isNameTagVisible() : boolisOnFire()
public function isOnFire() : boolisOnGround()
public function isOnGround() : boolisRiding() 5.46.0
public function isRiding() : boolisSilent()
public function isSilent() : boolisUnderwater()
public function isUnderwater() : boolkill()
public function kill() : voidmount() 5.46.0
public function mount(\pocketmine\entity\Entity $vehicle, bool $causedByRider = false) : boolMakes this entity ride the given vehicle, on its first free seat. Fails if the vehicle has no free seat this entity may take, or if the EntityMountEvent is cancelled. An entity riding something else gets off it first.
move() protected
protected function move(float $dx, float $dy, float $dz) : voidmovePassengerToFront() 5.46.0 protected
protected function movePassengerToFront(\pocketmine\entity\Entity $passenger) : voidMoves a passenger to the first seat (e.g. a player getting in a boat a mob sits in: the player steers it); the passengers before it move back a seat. Clients get the new links and seats at once.
nextRuntimeId()
public static function nextRuntimeId() : intReturns a new runtime entity ID for a new entity.
onCollideWithPlayer()
public function onCollideWithPlayer(\pocketmine\player\Player $player) : voidonDeath() protected
protected function onDeath() : voidOverride this to do actions on death.
onDeathUpdate() protected
protected function onDeathUpdate(int $tickDiff) : boolCalled to tick entities while dead. Returns whether the entity should be flagged for despawn yet.
onDismount() 5.46.0 protected
protected function onDismount(\pocketmine\entity\Entity $vehicle) : voidCalled when this entity got off its vehicle.
onDispose() protected
protected function onDispose() : voidCalled 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.
onFirstUpdate() protected
protected function onFirstUpdate(int $currentTick) : voidCalled 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.
onFrozenUpdate() 5.46.0
public function onFrozenUpdate(int $currentTick) : boolCalled by the world instead of onUpdate() while the entity is beyond the simulation distance of every player (see World::getSimulationDistance()): as in vanilla, it stays loaded and visible but doesn't move or act, and its own clock doesn't advance (the next onUpdate() sees a tick difference of 1). A new entity still gets its first update (spawn event, passenger links) at once.
onHitGround() protected
protected function onHitGround() : ?floatCalled when a falling entity hits the ground.
onInteract()
public function onInteract(\pocketmine\player\Player $player, \pocketmine\math\Vector3 $clickPos) : boolCalled when interacted or tapped by a Player. Returns whether something happened as a result of the interaction.
onMount() 5.46.0 protected
protected function onMount(\pocketmine\entity\Entity $vehicle) : voidCalled when this entity got on a vehicle.
onNearbyBlockChange()
public function onNearbyBlockChange() : voidonPassengerAdded() 5.46.0 protected
protected function onPassengerAdded(\pocketmine\entity\Entity $passenger) : voidCalled when an entity got on this one.
onPassengerRemoved() 5.46.0 protected
protected function onPassengerRemoved(\pocketmine\entity\Entity $passenger) : voidCalled when a passenger got off this entity.
onRandomUpdate()
public function onRandomUpdate() : voidCalled 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).
onStruckByLightning() 5.46.0
public function onStruckByLightning(\pocketmine\entity\object\LightningBolt $bolt) : voidCalled when a lightning bolt strikes the entity (once per bolt). Vanilla: 8 seconds of fire and 5 damage. Mobs that change when struck (pigs, villagers, creepers, mooshrooms...) override this.
onUpdate()
public function onUpdate(int $currentTick) : boolpositionPassengers() 5.46.0 protected
protected function positionPassengers() : voidMoves the passengers onto their seats. Called after this entity moved, every tick.
recalculateBoundingBox() protected
protected function recalculateBoundingBox() : voidrefreshPassengerSeats() 5.46.0 protected
protected function refreshPassengerSeats() : voidSends the seats of all the passengers again, for vehicles whose seats depend on how many passengers they carry (boats).
removeCommandTag() 5.46.0
public function removeCommandTag(string $tag) : boolRemoves a command tag. Returns false if the entity did not have it.
resetFallDistance()
public function resetFallDistance() : voidresetLastMovements() protected
protected function resetLastMovements() : voidrespawnToAll()
public function respawnToAll() : voidsaveNBT()
public function saveNBT() : \pocketmine\nbt\tag\CompoundTagscheduleUpdate()
final public function scheduleUpdate() : voidsendData()
public function sendData(?array $targets, ?array $data = null) : voidsendSpawnPacket() protected
protected function sendSpawnPacket(\pocketmine\player\Player $player) : voidCalled by spawnTo() to send whatever packets needed to spawn the entity to the client.
setCanClimb()
public function setCanClimb(bool $value = true) : voidSets whether the entity is able to climb climbable blocks.
setCanClimbWalls()
public function setCanClimbWalls(bool $value = true) : voidSets whether the entity is climbing a block. If true, the entity can climb anything.
setCanSaveWithChunk()
public function setCanSaveWithChunk(bool $value) : voidSets whether this entity will be saved when its chunk is unloaded. This can be used to prevent the entity being saved to disk.
setFallDistance()
public function setFallDistance(float $fallDistance) : voidsetFireTicks()
public function setFireTicks(int $fireTicks) : voidsetForceMovementUpdate()
final public function setForceMovementUpdate(bool $value = true) : voidFlags 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.
setGravity()
public function setGravity(float $gravity) : voidsetHasGravity()
public function setHasGravity(bool $v = true) : voidsetHealth()
public function setHealth(float $amount) : voidSets the health of the Entity. This won't send any update to the players
setInvisible()
public function setInvisible(bool $value = true) : voidsetLastDamageCause()
public function setLastDamageCause(\pocketmine\event\entity\EntityDamageEvent $type) : voidsetMaxHealth()
public function setMaxHealth(int $amount) : voidsetMotion()
public function setMotion(\pocketmine\math\Vector3 $motion) : boolsetNameTag()
public function setNameTag(string $name) : voidsetNameTagAlwaysVisible()
public function setNameTagAlwaysVisible(bool $value = true) : voidsetNameTagVisible()
public function setNameTagVisible(bool $value = true) : voidsetNoClientPredictions()
public function setNoClientPredictions(bool $value = true) : voidThings 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.
setOnFire()
public function setOnFire(int $seconds) : voidsetOwningEntity()
public function setOwningEntity(?\pocketmine\entity\Entity $owner) : voidSets the owner of the entity. Passing null will remove the current owner.
setPosition() protected
protected function setPosition(\pocketmine\math\Vector3 $pos) : boolsetPositionAndRotation() protected
protected function setPositionAndRotation(\pocketmine\math\Vector3 $pos, float $yaw, float $pitch) : boolsetRotation()
public function setRotation(float $yaw, float $pitch) : voidsetScale()
public function setScale(float $value) : voidsetScoreTag()
public function setScoreTag(string $score) : voidsetSilent()
public function setSilent(bool $value = true) : voidsetSize() protected
protected function setSize(\pocketmine\entity\EntitySizeInfo $size) : voidsetStepHeight()
public function setStepHeight(float $stepHeight) : voidsetTargetEntity()
public function setTargetEntity(?\pocketmine\entity\Entity $target) : voidSets the entity's target entity. Passing null will remove the current target.
spawnTo()
public function spawnTo(\pocketmine\player\Player $player) : voidspawnToAll()
public function spawnToAll() : voidsyncNetworkData() protected
protected function syncNetworkData(\pocketmine\network\mcpe\protocol\types\entity\EntityMetadataCollection $properties) : voidteleport()
public function teleport(\pocketmine\math\Vector3 $pos, ?float $yaw = null, ?float $pitch = null) : booltryChangeMovement() protected
protected function tryChangeMovement() : voidupdateFallState() protected
protected function updateFallState(float $distanceThisTick, bool $onGround) : ?floatupdateMovement() protected
protected function updateMovement(bool $teleport = false) : void