PHP Class pocketmine\entity\Entity

Inheritance: extends pocketmine\level\Location, implements pocketmine\metadata\Metadatable
Afficher le fichier Open project: iTXTech/Genisys Class Usage Examples

Méthodes publiques

Свойство Type Description
$boundingBox pocketmine\math\AxisAlignedBB
$canCollide
$chunk pocketmine\level\format\Chunk
$closed
$deadTicks
$dropExp
$entityCount
$eyeHeight
$fallDistance
$fireTicks
$height
$inBlock
$isCollided
$isCollidedHorizontally
$isCollidedVertically
$keepMovement
$lastMotionX
$lastMotionY
$lastMotionZ
$lastPitch
$lastUpdate
$lastX
$lastY
$lastYaw
$lastZ
$length
$maxFireTicks
$motionChanged
$motionX
$motionY
$motionZ
$namedtag
$noDamageTicks
$onGround
$passenger
$positionChanged
$temporalVector pocketmine\math\Vector3
$ticksLived
$vehicle
$width

Protected Properties

Свойство Type Description
$activatedPressurePlates pocketmine\block\PressurePlate
$age
$attributeMap AttributeMap
$dataFlags
$dataProperties
$drag
$effects Effect[]
$fireProof
$gravity
$hasSpawned pocketmine\Player[]
$id
$isPlayer
$isStatic
$justCreated
$lastDamageCause
$linkedEntity Entity
$linkedType 0 no linked 1 linked other 2 be linked
$riding
$server pocketmine\Server
$stepHeight
$timings pocketmine\event\TimingsHandler
$ySize

Méthodes publiques

Méthode Description
__construct ( pocketmine\level\format\FullChunk $chunk, CompoundTag $nbt )
__destruct ( )
__toString ( )
addEffect ( Effect $effect )
addMovement ( $x, $y, $z, $yaw, $pitch, $headYaw = null )
attack ( float $damage, EntityDamageEvent $source ) : boolean
canCollideWith ( Entity $entity )
canTriggerWalking ( )
close ( )
createEntity ( integer | string $type, pocketmine\level\format\FullChunk $chunk, CompoundTag $nbt, $args ) : Entity | Projectile
despawnFrom ( Player $player )
despawnFromAll ( )
entityBaseTick ( $tickDiff = 1 )
extinguish ( )
fall ( $fallDistance )
fastMove ( $dx, $dy, $dz )
getAttributeMap ( )
getBlocksAround ( )
getBoundingBox ( )
getDataFlag ( integer $propertyId, integer $id ) : boolean
getDataProperty ( integer $id ) : mixed
getDataPropertyType ( integer $id ) : integer
getDirection ( )
getDirectionPlane ( )
getDirectionVector ( ) : Vector3
getDropExpMax ( ) : integer
getDropExpMin ( ) : integer
getEffect ( $effectId )
getEffects ( ) : Effect[]
getEyeHeight ( )
getHealth ( ) : integer
getId ( )
getLastDamageCause ( ) : EntityDamageEvent | null
getLinkedEntity ( )
getLinkedType ( )
getLocation ( )
getMaxHealth ( ) : integer
getMetadata ( $metadataKey )
getMotion ( )
getNameTag ( ) : string
getPosition ( )
getSaveId ( ) : string Returns the short save name
getViewers ( ) : Player[]
handleLavaMovement ( )
hasEffect ( $effectId )
hasMetadata ( $metadataKey )
heal ( float $amount, EntityRegainHealthEvent $source )
isAlive ( )
isInsideOfFire ( )
isInsideOfPortal ( )
isInsideOfSolid ( )
isInsideOfWater ( )
isNameTagVisible ( ) : boolean
isOnFire ( )
isOnGround ( )
isSneaking ( )
isSprinting ( )
kill ( )
linkEntity ( Entity $entity )
move ( $dx, $dy, $dz )
moveFlying ( )
onCollideWithPlayer ( Human $entityPlayer )
onUpdate ( $currentTick )
registerEntity ( $className, $force = false )
removeAllEffects ( )
removeEffect ( $effectId )
removeMetadata ( $metadataKey, pocketmine\plugin\Plugin $plugin )
resetFallDistance ( )
respawnToAll ( )
saveNBT ( )
scheduleUpdate ( )
sendData ( Player[] | Player $player, array $data = null )
sendLinkedData ( )
sendPotionEffects ( Player $player )
setDataFlag ( $propertyId, $id, boolean $value = true, integer $type = self::DATA_TYPE_BYTE )
setDataProperty ( integer $id, integer $type, mixed $value ) : boolean
setHealth ( integer $amount ) Sets the health of the Entity. This won't send any update to the players
setLastDamageCause ( EntityDamageEvent $type )
setLinked ( $type, Entity $entity )
setLocation ( Location $pos )
setMaxHealth ( integer $amount )
setMetadata ( $metadataKey, MetadataValue $metadataValue )
setMotion ( Vector3 $motion )
setNameTag ( string $name )
setNameTagVisible ( boolean $value = true )
setOnFire ( $seconds )
setPosition ( Vector3 $pos )
setPositionAndRotation ( Vector3 $pos, $yaw, $pitch )
setRotation ( $yaw, $pitch )
setSneaking ( $value = true )
setSprinting ( $value = true )
spawnTo ( Player $player )
spawnToAll ( )
teleport ( Vector3 $pos, float $yaw = null, float $pitch = null ) : boolean

Méthodes protégées

Méthode Description
addAttributes ( )
checkBlockCollision ( )
checkChunks ( )
checkGroundState ( $movX, $movY, $movZ, $dx, $dy, $dz )
checkObstruction ( $x, $y, $z )
initEntity ( )
recalculateEffectColor ( )
switchLevel ( Level $targetLevel )
updateFallState ( $distanceThisTick, $onGround )
updateMovement ( )

Method Details

__construct() public méthode

public __construct ( pocketmine\level\format\FullChunk $chunk, CompoundTag $nbt )
$chunk pocketmine\level\format\FullChunk
$nbt pocketmine\nbt\tag\CompoundTag

__destruct() public méthode

public __destruct ( )

__toString() public méthode

public __toString ( )

addAttributes() protected méthode

protected addAttributes ( )

addEffect() public méthode

public addEffect ( Effect $effect )
$effect Effect

addMovement() public méthode

public addMovement ( $x, $y, $z, $yaw, $pitch, $headYaw = null )

attack() public méthode

public attack ( float $damage, EntityDamageEvent $source ) : boolean
$damage float
$source pocketmine\event\entity\EntityDamageEvent
Résultat boolean

canCollideWith() public méthode

public canCollideWith ( Entity $entity )
$entity Entity

canTriggerWalking() public méthode

public canTriggerWalking ( )

checkBlockCollision() protected méthode

protected checkBlockCollision ( )

checkChunks() protected méthode

protected checkChunks ( )

checkGroundState() protected méthode

protected checkGroundState ( $movX, $movY, $movZ, $dx, $dy, $dz )

checkObstruction() protected méthode

protected checkObstruction ( $x, $y, $z )

close() public méthode

public close ( )

createEntity() public static méthode

public static createEntity ( integer | string $type, pocketmine\level\format\FullChunk $chunk, CompoundTag $nbt, $args ) : Entity | Projectile
$type integer | string
$chunk pocketmine\level\format\FullChunk
$nbt pocketmine\nbt\tag\CompoundTag
$args
Résultat Entity | Projectile

despawnFrom() public méthode

public despawnFrom ( Player $player )
$player pocketmine\Player

despawnFromAll() public méthode

public despawnFromAll ( )

entityBaseTick() public méthode

public entityBaseTick ( $tickDiff = 1 )

extinguish() public méthode

public extinguish ( )

fall() public méthode

public fall ( $fallDistance )

fastMove() public méthode

public fastMove ( $dx, $dy, $dz )

getAttributeMap() public méthode

public getAttributeMap ( )

getBlocksAround() public méthode

public getBlocksAround ( )

getBoundingBox() public méthode

public getBoundingBox ( )

getDataFlag() public méthode

public getDataFlag ( integer $propertyId, integer $id ) : boolean
$propertyId integer
$id integer
Résultat boolean

getDataProperty() public méthode

public getDataProperty ( integer $id ) : mixed
$id integer
Résultat mixed

getDataPropertyType() public méthode

public getDataPropertyType ( integer $id ) : integer
$id integer
Résultat integer

getDirection() public méthode

public getDirection ( )

getDirectionPlane() public méthode

public getDirectionPlane ( )

getDirectionVector() public méthode

public getDirectionVector ( ) : Vector3
Résultat pocketmine\math\Vector3

getDropExpMax() public méthode

public getDropExpMax ( ) : integer
Résultat integer

getDropExpMin() public méthode

public getDropExpMin ( ) : integer
Résultat integer

getEffect() public méthode

public getEffect ( $effectId )

getEffects() public méthode

public getEffects ( ) : Effect[]
Résultat Effect[]

getEyeHeight() public méthode

public getEyeHeight ( )

getHealth() public méthode

public getHealth ( ) : integer
Résultat integer

getId() public méthode

public getId ( )

getLastDamageCause() public méthode

public getLastDamageCause ( ) : EntityDamageEvent | null
Résultat pocketmine\event\entity\EntityDamageEvent | null

getLinkedEntity() public méthode

public getLinkedEntity ( )

getLinkedType() public méthode

public getLinkedType ( )

getLocation() public méthode

public getLocation ( )

getMaxHealth() public méthode

public getMaxHealth ( ) : integer
Résultat integer

getMetadata() public méthode

public getMetadata ( $metadataKey )

getMotion() public méthode

public getMotion ( )

getNameTag() public méthode

public getNameTag ( ) : string
Résultat string

getPosition() public méthode

public getPosition ( )

getSaveId() public méthode

Returns the short save name
public getSaveId ( ) : string
Résultat string

getViewers() public méthode

public getViewers ( ) : Player[]
Résultat pocketmine\Player[]

handleLavaMovement() public méthode

public handleLavaMovement ( )

hasEffect() public méthode

public hasEffect ( $effectId )

hasMetadata() public méthode

public hasMetadata ( $metadataKey )

heal() public méthode

public heal ( float $amount, EntityRegainHealthEvent $source )
$amount float
$source pocketmine\event\entity\EntityRegainHealthEvent

initEntity() protected méthode

protected initEntity ( )

isAlive() public méthode

public isAlive ( )

isInsideOfFire() public méthode

public isInsideOfFire ( )

isInsideOfPortal() public méthode

public isInsideOfPortal ( )

isInsideOfSolid() public méthode

public isInsideOfSolid ( )

isInsideOfWater() public méthode

public isInsideOfWater ( )

isNameTagVisible() public méthode

public isNameTagVisible ( ) : boolean
Résultat boolean

isOnFire() public méthode

public isOnFire ( )

isOnGround() public méthode

public isOnGround ( )

isSneaking() public méthode

public isSneaking ( )

isSprinting() public méthode

public isSprinting ( )

kill() public méthode

public kill ( )

linkEntity() public méthode

public linkEntity ( Entity $entity )
$entity Entity

move() public méthode

public move ( $dx, $dy, $dz )

moveFlying() public méthode

public moveFlying ( )

onCollideWithPlayer() public méthode

public onCollideWithPlayer ( Human $entityPlayer )
$entityPlayer Human

onUpdate() public méthode

public onUpdate ( $currentTick )

recalculateEffectColor() protected méthode

protected recalculateEffectColor ( )

registerEntity() public static méthode

public static registerEntity ( $className, $force = false )

removeAllEffects() public méthode

public removeAllEffects ( )

removeEffect() public méthode

public removeEffect ( $effectId )

removeMetadata() public méthode

public removeMetadata ( $metadataKey, pocketmine\plugin\Plugin $plugin )
$plugin pocketmine\plugin\Plugin

resetFallDistance() public méthode

public resetFallDistance ( )

respawnToAll() public méthode

public respawnToAll ( )

saveNBT() public méthode

public saveNBT ( )

scheduleUpdate() final public méthode

final public scheduleUpdate ( )

sendData() public méthode

public sendData ( Player[] | Player $player, array $data = null )
$player pocketmine\Player[] | pocketmine\Player
$data array Properly formatted entity data, defaults to everything

sendLinkedData() public méthode

public sendLinkedData ( )

sendPotionEffects() public méthode

public sendPotionEffects ( Player $player )
$player pocketmine\Player

setDataFlag() public méthode

public setDataFlag ( $propertyId, $id, boolean $value = true, integer $type = self::DATA_TYPE_BYTE )
$propertyId
$id
$value boolean
$type integer

setDataProperty() public méthode

public setDataProperty ( integer $id, integer $type, mixed $value ) : boolean
$id integer
$type integer
$value mixed
Résultat boolean

setHealth() public méthode

Sets the health of the Entity. This won't send any update to the players
public setHealth ( integer $amount )
$amount integer

setLastDamageCause() public méthode

public setLastDamageCause ( EntityDamageEvent $type )
$type pocketmine\event\entity\EntityDamageEvent

setLinked() public méthode

public setLinked ( $type, Entity $entity )
$entity Entity

setLocation() public méthode

public setLocation ( Location $pos )
$pos pocketmine\level\Location

setMaxHealth() public méthode

public setMaxHealth ( integer $amount )
$amount integer

setMetadata() public méthode

public setMetadata ( $metadataKey, MetadataValue $metadataValue )
$metadataValue pocketmine\metadata\MetadataValue

setMotion() public méthode

public setMotion ( Vector3 $motion )
$motion pocketmine\math\Vector3

setNameTag() public méthode

public setNameTag ( string $name )
$name string

setNameTagVisible() public méthode

public setNameTagVisible ( boolean $value = true )
$value boolean

setOnFire() public méthode

public setOnFire ( $seconds )

setPosition() public méthode

public setPosition ( Vector3 $pos )
$pos pocketmine\math\Vector3

setPositionAndRotation() public méthode

public setPositionAndRotation ( Vector3 $pos, $yaw, $pitch )
$pos pocketmine\math\Vector3

setRotation() public méthode

public setRotation ( $yaw, $pitch )

setSneaking() public méthode

public setSneaking ( $value = true )

setSprinting() public méthode

public setSprinting ( $value = true )

spawnTo() public méthode

public spawnTo ( Player $player )
$player pocketmine\Player

spawnToAll() public méthode

public spawnToAll ( )

switchLevel() protected méthode

protected switchLevel ( Level $targetLevel )
$targetLevel pocketmine\level\Level

teleport() public méthode

public teleport ( Vector3 $pos, float $yaw = null, float $pitch = null ) : boolean
$pos pocketmine\math\Vector3
$yaw float
$pitch float
Résultat boolean

updateFallState() protected méthode

protected updateFallState ( $distanceThisTick, $onGround )

updateMovement() protected méthode

protected updateMovement ( )

Property Details

$activatedPressurePlates protected_oe property

protected PressurePlate,pocketmine\block $activatedPressurePlates
Résultat pocketmine\block\PressurePlate

$age protected_oe property

protected $age

$attributeMap protected_oe property

protected AttributeMap,pocketmine\entity $attributeMap
Résultat AttributeMap

$boundingBox public_oe property

public AxisAlignedBB,pocketmine\math $boundingBox
Résultat pocketmine\math\AxisAlignedBB

$canCollide public_oe property

public $canCollide

$chunk public_oe property

public Chunk,pocketmine\level\format $chunk
Résultat pocketmine\level\format\Chunk

$closed public_oe property

public $closed

$dataFlags protected_oe property

protected $dataFlags

$dataProperties protected_oe property

protected $dataProperties

$deadTicks public_oe property

public $deadTicks

$drag protected_oe property

protected $drag

$dropExp public_oe property

public $dropExp

$effects protected_oe property

protected Effect[],pocketmine\entity $effects
Résultat Effect[]

$entityCount public_oe static_oe property

public static $entityCount

$eyeHeight public_oe property

public $eyeHeight

$fallDistance public_oe property

public $fallDistance

$fireProof protected_oe property

protected $fireProof

$fireTicks public_oe property

public $fireTicks

$gravity protected_oe property

protected $gravity

$hasSpawned protected_oe property

protected Player[],pocketmine $hasSpawned
Résultat pocketmine\Player[]

$height public_oe property

public $height

$id protected_oe property

protected $id

$inBlock public_oe property

public $inBlock

$isCollided public_oe property

public $isCollided

$isCollidedHorizontally public_oe property

public $isCollidedHorizontally

$isCollidedVertically public_oe property

public $isCollidedVertically

$isPlayer protected_oe property

protected $isPlayer

$isStatic protected_oe property

protected $isStatic

$justCreated protected_oe property

protected $justCreated

$keepMovement public_oe property

public $keepMovement

$lastDamageCause protected_oe property

protected $lastDamageCause

$lastMotionX public_oe property

public $lastMotionX

$lastMotionY public_oe property

public $lastMotionY

$lastMotionZ public_oe property

public $lastMotionZ

$lastPitch public_oe property

public $lastPitch

$lastUpdate public_oe property

public $lastUpdate

$lastX public_oe property

public $lastX

$lastY public_oe property

public $lastY

$lastYaw public_oe property

public $lastYaw

$lastZ public_oe property

public $lastZ

$length public_oe property

public $length

$linkedEntity protected_oe property

protected Entity,pocketmine\entity $linkedEntity
Résultat Entity

$linkedType protected_oe property

0 no linked 1 linked other 2 be linked
protected $linkedType

$maxFireTicks public_oe property

public $maxFireTicks

$motionChanged public_oe property

public $motionChanged

$motionX public_oe property

public $motionX

$motionY public_oe property

public $motionY

$motionZ public_oe property

public $motionZ

$namedtag public_oe property

public $namedtag

$noDamageTicks public_oe property

public $noDamageTicks

$onGround public_oe property

public $onGround

$passenger public_oe property

public $passenger

$positionChanged public_oe property

public $positionChanged

$riding protected_oe property

protected $riding

$server protected_oe property

protected Server,pocketmine $server
Résultat pocketmine\Server

$stepHeight protected_oe property

protected $stepHeight

$temporalVector public_oe property

public Vector3,pocketmine\math $temporalVector
Résultat pocketmine\math\Vector3

$ticksLived public_oe property

public $ticksLived

$timings protected_oe property

protected TimingsHandler,pocketmine\event $timings
Résultat pocketmine\event\TimingsHandler

$vehicle public_oe property

public $vehicle

$width public_oe property

public $width

$ySize protected_oe property

protected $ySize