cExpOrb


Index:
Articles
Classes
Hooks

Quick navigation:
cArrowEntity
cBeaconEntity
cBedEntity
cBlockArea
cBlockEntity
cBlockEntityWithItems
cBlockInfo
cBoat
cBoundingBox
cBrewingstandEntity
cChatColor
cChestEntity
cChunkDesc
cClientHandle
cColor
cCommandBlockEntity
cCompositeChat
cCraftingGrid
cCraftingRecipe
cCryptoHash
cCuboid
cDispenserEntity
cDropperEntity
cDropSpenserEntity
cEnchantments
cEntity
cEntityEffect
cExpBottleEntity
cExpOrb
cFallingBlock
cFile
cFireChargeEntity
cFireworkEntity
cFloater
cFlowerPotEntity
cFurnaceEntity
cGhastFireballEntity
cHangingEntity
cHopperEntity
cIniFile
cInventory
cItem
cItemFrame
cItemGrid
cItems
cJson
cJukeboxEntity
cLeashKnot
cLineBlockTracer
cLuaWindow
cMap
cMapManager
cMobHeadEntity
cMobSpawnerEntity
cMojangAPI
cMonster
cNetwork
cNoteEntity
cObjective
cPainting
cPawn
cPickup
cPlayer
cPlugin
cPluginLua
cPluginManager
cProjectileEntity
cRankManager
cRoot
cScoreboard
cServer
cServerHandle
cSignEntity
cSplashPotionEntity
cStatManager
cStringCompression
cTCPLink
cTeam
cThrownEggEntity
cThrownEnderPearlEntity
cThrownSnowballEntity
cTNTEntity
cTracer
cUDPEndpoint
cUrlClient
cUrlParser
cUUID
cWebAdmin
cWindow
cWitherSkullEntity
cWorld
EffectID
HTTPFormData
HTTPRequest
HTTPTemplateRequest
ItemCategory
lxp
SmokeDirection
sqlite3
TakeDamageInfo
tolua
Vector3d
Vector3f
Vector3i
Globals

Contents


cExpOrb class

This class represents an experience orb. This entity can be spawned by using cWorld:SpawnExperienceOrb. It's also spawned when a monster is killed or a player is mining coal. The default lifetime of an experience orb is 5 mins.


Inheritance

This class inherits from the following parent classes:


Constants

Constants inherited from cEntity

NameValueNotes
INVALID_ID 0 Special value of an entity ID, indicating a failure. Used primarily in functions that create entities when the entity cannot be created.

Functions

NameParametersReturn valueNotes
GetAge
number
Returns the number of ticks that this experience orb has existed.
GetReward
number
Returns the experience amount.
SetAge
number
Sets the experience orb's age, in ticks.
SetReward
number
Sets the experience amount.

Functions inherited from cEntity

NameParametersReturn valueNotes
AddPosX
OffsetXnumber
Moves the entity by the specified amount in the X axis direction
AddPosY
OffsetYnumber
Moves the entity by the specified amount in the Y axis direction
AddPosZ
OffsetZnumber
Moves the entity by the specified amount in the Z axis direction
AddPosition
OffsetXnumber
OffsetYnumber
OffsetZnumber
Moves the entity by the specified amount in each axis direction
AddPosition
OffsetVector3d
Moves the entity by the specified amount in each direction
AddSpeed
AddXnumber
AddYnumber
AddZnumber
Adds the specified amount of speed in each axis direction.
AddSpeed
AddVector3d
Adds the specified amount of speed in each axis direction.
AddSpeedX
AddXnumber
Adds the specified amount of speed in the X axis direction.
AddSpeedY
AddYnumber
Adds the specified amount of speed in the Y axis direction.
AddSpeedZ
AddZnumber
Adds the specified amount of speed in the Z axis direction.
ApplyArmorDamage
DamageBlockednumber
Lowers armor durability, as if the armor blocked the given amount of damage.
ArmorCoversAgainst
DamageTypeeDamageType
boolean
Returns whether armor will protect against the specified damage type
Destroy
ShouldBroadcastboolean
Schedules the entity to be destroyed; if ShouldBroadcast is not present or set to true, broadcasts the DestroyEntity packet
DoesPreventBlockPlacement
boolean
Returns true if this entity doesn't allow blocks to be placed intersecting the entity.
GetAirDrag (undocumented)
GetAirLevel
number
Returns the air level (number of ticks of air left). Note, this function is only updated with mobs or players.
GetArmorCoverAgainst
AttackerEntitycEntity
DamageTypeeDamageType
RawDamagenumber
number
Returns the number of hitpoints out of RawDamage that the currently equipped armor would cover. See TakeDamageInfo for more information on attack damage.
GetChunkX
number
Returns the X-coord of the chunk in which the entity is placed
GetChunkZ
number
Returns the Z-coord of the chunk in which the entity is placed
GetClass
string
Returns the classname of the entity, such as "cSpider" or "cPickup"
GetClassStatic
string
(STATIC) Returns the entity classname that this class implements. Each descendant overrides this function.
GetEnchantmentCoverAgainst
AttackerEntitycEntity
DamageTypeeDamageType
RawDamagenumber
number
Returns the number of hitpoints out of RawDamage that the enchantments on the currently equipped armor would cover. See TakeDamageInfo for more information on attack damage.
GetEntityType
EntityTypeeEntityType
Returns the type of the entity, one of the etXXX constants. Note that to check specific entity type, you should use one of the IsXXX functions instead of comparing the value returned by this call.
GetEquippedBoots
cItem
Returns the boots that the entity has equipped. Returns an empty cItem if no boots equipped or not applicable.
GetEquippedChestplate
cItem
Returns the chestplate that the entity has equipped. Returns an empty cItem if no chestplate equipped or not applicable.
GetEquippedHelmet
cItem
Returns the helmet that the entity has equipped. Returns an empty cItem if no helmet equipped or not applicable.
GetEquippedLeggings
cItem
Returns the leggings that the entity has equipped. Returns an empty cItem if no leggings equipped or not applicable.
GetEquippedWeapon
cItem
Returns the weapon that the entity has equipped. Returns an empty cItem if no weapon equipped or not applicable.
GetGravity
number
Returns the number that is used as the gravity for physics simulation. 1G (9.78) by default.
GetHeadYaw
number
Returns the pitch of the entity's head (FIXME: Rename to GetHeadPitch() ).
GetHealth
number
Returns the current health of the entity.
GetHeight
number
Returns the height (Y size) of the entity
GetInvulnerableTicks
number
Returns the number of ticks that this entity will be invulnerable for. This is used for after-hit recovery - the entities are invulnerable for half a second after being hit.
GetKnockbackAmountAgainst
ReceiverEntitycEntity
number
Returns the amount of knockback that the currently equipped items would cause when attacking the ReceiverEntity.
GetLookVector
Vector3f
Returns the vector that defines the direction in which the entity is looking
GetMass
number
Returns the mass of the entity. Currently unused.
GetMaxHealth
number
Returns the maximum number of hitpoints this entity is allowed to have.
GetParentClass
string
Returns the name of the direct parent class for this entity
GetPitch
number
Returns the pitch (nose-down rotation) of the entity. Measured in degrees, normal values range from -90 to +90. +90 means looking down, 0 means looking straight ahead, -90 means looking up.
GetPosX
number
Returns the X-coord of the entity's pivot
GetPosY
number
Returns the Y-coord of the entity's pivot
GetPosZ
number
Returns the Z-coord of the entity's pivot
GetPosition
Vector3d
Returns the entity's pivot position as a 3D vector
GetRawDamageAgainst
ReceiverEntitycEntity
number
Returns the raw damage that this entity's equipment would cause when attacking the ReceiverEntity. This includes this entity's weapon enchantments, but excludes the receiver's armor or potion effects. See TakeDamageInfo for more information on attack damage.
GetRoll
number
Returns the roll (sideways rotation) of the entity. Currently unused.
GetSpeed
Vector3d
Returns the complete speed vector of the entity
GetSpeedX
number
Returns the X-part of the speed vector
GetSpeedY
number
Returns the Y-part of the speed vector
GetSpeedZ
number
Returns the Z-part of the speed vector
GetTicksAlive
number
Returns the number of ticks that this entity has been alive for.
GetUniqueID
number
Returns the ID that uniquely identifies the entity within the running server. Note that this ID is not persisted to the data files.
GetWidth
number
Returns the width (X and Z size) of the entity.
GetWorld
cWorld
Returns the world where the entity resides
GetYaw
number
Returns the yaw (direction) of the entity. Measured in degrees, values range from -180 to +180. 0 means ZP, 90 means XM, -180 means ZM, -90 means XP.
HandleSpeedFromAttachee
ForwardAmountnumber
SidewaysAmountnumber
Updates the entity's speed based on the attachee exerting the specified force forward and sideways. Used for entities being driven by other entities attached to them - usually players driving minecarts and boats.
Heal
Hitpointsnumber
Heals the specified number of hitpoints. Hitpoints is expected to be a positive number.
IsA
ClassNamestring
boolean
Returns true if the entity class is a descendant of the specified class name, or the specified class itself
IsBoat
boolean
Returns true if the entity is a boat.
IsCrouched
boolean
Returns true if the entity is crouched. Always false for entities that don't support crouching.
IsDestroyed
boolean
(DEPRECATED) Please use cEntity:IsTicking().
IsEnderCrystal
boolean
Returns true if the entity is an ender crystal.
IsExpOrb
boolean
Returns true if the entity represents an experience orb
IsFallingBlock
boolean
Returns true if the entity represents a cFallingBlock entity.
IsFireproof
boolean
Returns true if the entity takes no damage from being on fire.
IsFloater
boolean
Returns true if the entity represents a fishing rod floater
IsInvisible
boolean
Returns true if the entity is invisible
IsItemFrame
boolean
Returns true if the entity is an item frame.
IsLeashKnot
boolean
Returns true if the entity is a leash knot.
IsMinecart
boolean
Returns true if the entity represents a minecart
IsMob
boolean
Returns true if the entity represents any mob.
IsOnFire
boolean
Returns true if the entity is on fire
IsOnGround
boolean
Returns true if the entity is on ground (not falling, not jumping, not flying)
IsPainting
boolean
Returns if this entity is a painting.
IsPawn
boolean
Returns true if the entity is a cPawn descendant.
IsPickup
boolean
Returns true if the entity represents a pickup.
IsPlayer
boolean
Returns true if the entity represents a player
IsProjectile
boolean
Returns true if the entity is a cProjectileEntity descendant.
IsRclking
boolean
Currently unimplemented
IsRiding
boolean
Returns true if the entity is attached to (riding) another entity.
IsSprinting
boolean
Returns true if the entity is sprinting. Entities that cannot sprint return always false
IsSubmerged
boolean
Returns true if the mob or player is submerged in water (head is in a water block). Note, this function is only updated with mobs or players.
IsSwimming
boolean
Returns true if the mob or player is swimming in water (feet are in a water block). Note, this function is only updated with mobs or players.
IsTNT
boolean
Returns true if the entity represents a TNT entity
IsTicking
boolean
Returns true if the entity is valid and ticking. Returns false if the entity is not ticking and is about to leave its current world either via teleportation or destruction. If this returns false, you must stop using the cEntity pointer you have.
Killed
VictimcEntity
This entity has killed another entity (the Victim). For players, adds the scoreboard statistics about the kill.
MoveToWorld
WorldNamestring
ShouldSendRespawnboolean
boolean
Removes the entity from this world and starts moving it to the specified world's spawn point. Note that to avoid deadlocks, the move is asynchronous - the entity is moved into a queue and will be moved from that queue into the destination world at some (unpredictable) time in the future. ShouldSendRespawn is used only for players, it specifies whether the player should be sent a Respawn packet upon leaving the world (The client handles respawns only between different dimensions). OBSOLETE, use ScheduleMoveToWorld() instead.
MoveToWorld
WorldcWorld
ShouldSendRespawnboolean
boolean
Removes the entity from this world and starts moving it to the specified world's spawn point. Note that to avoid deadlocks, the move is asynchronous - the entity is moved into a queue and will be moved from that queue into the destination world at some (unpredictable) time in the future. ShouldSendRespawn is used only for players, it specifies whether the player should be sent a Respawn packet upon leaving the world (The client handles respawns only between different dimensions). OBSOLETE, use ScheduleMoveToWorld() instead.
MoveToWorld
WorldcWorld
ShouldSendRespawnboolean
PositionVector3d
boolean
Removes the entity from this world and starts moving it to the specified world. Note that to avoid deadlocks, the move is asynchronous - the entity is moved into a queue and will be moved from that queue into the destination world at some (unpredictable) time in the future. ShouldSendRespawn is used only for players, it specifies whether the player should be sent a Respawn packet upon leaving the world (The client handles respawns only between different dimensions). The Position parameter specifies the location that the entity should be placed in, in the new world. OBSOLETE, use ScheduleMoveToWorld() instead.
ScheduleMoveToWorld
WorldcWorld
NewPositionVector3d
ShouldSetPortalCooldownboolean
ShouldSendRespawnboolean
Schedules a MoveToWorld call to occur on the next Tick of the entity. If ShouldSetPortalCooldown is false (default), doesn't set any portal cooldown, if it is true, the default portal cooldown is applied to the entity. If ShouldSendRespawn is false (default), no respawn packet is sent, if it is true then a respawn packet is sent to the client.
SetAirDrag (undocumented)
SetGravity
Gravitynumber
Sets the number that is used as the gravity for physics simulation. 1G (9.78) by default.
SetHeadYaw
HeadPitchnumber
Sets the head pitch (FIXME: Rename to SetHeadPitch() ).
SetHealth
Hitpointsnumber
Sets the entity's health to the specified amount of hitpoints. Doesn't broadcast any hurt animation. Doesn't kill the entity if health drops below zero. Use the TakeDamage() function instead for taking damage.
SetInvulnerableTicks
NumTicksnumber
Sets the amount of ticks for which the entity will not receive any damage from other entities.
SetIsFireproof
IsFireproofboolean
Sets whether the entity receives damage from being on fire.
SetMass
Massnumber
Sets the mass of the entity. Currently unused.
SetMaxHealth
MaxHitpointsnumber
Sets the maximum hitpoints of the entity. If current health is above MaxHitpoints, it is capped to MaxHitpoints.
SetPitch
Pitchnumber
Sets the pitch (nose-down rotation) of the entity
SetPitchFromSpeed Sets the entity pitch to match its speed (entity looking forwards as it moves)
SetPosX
PosXnumber
Sets the X-coord of the entity's pivot
SetPosY
PosYnumber
Sets the Y-coord of the entity's pivot
SetPosZ
PosZnumber
Sets the Z-coord of the entity's pivot
SetPosition
Vector3dVector3d
Sets all three coords of the entity's pivot
SetPosition
PosXnumber
PosYnumber
PosZnumber
Sets all three coords of the entity's pivot
SetRoll
Rollnumber
Sets the roll (sideways rotation) of the entity. Currently unused.
SetSpeed
SpeedVector3d
Sets the current speed of the entity
SetSpeed
SpeedXnumber
SpeedYnumber
SpeedZnumber
Sets the current speed of the entity
SetSpeedX
SpeedXnumber
Sets the X component of the entity speed
SetSpeedY
SpeedYnumber
Sets the Y component of the entity speed
SetSpeedZ
SpeedZnumber
Sets the Z component of the entity speed
SetYaw
Yawnumber
Sets the yaw (direction) of the entity.
SetYawFromSpeed Sets the entity's yaw to match its current speed (entity looking forwards as it moves).
StartBurning
NumTicksnumber
Sets the entity on fire for the specified number of ticks. If entity is on fire already, makes it burn for either NumTicks or the number of ticks left from the previous fire, whichever is larger.
SteerVehicle
ForwardAmountnumber
SidewaysAmountnumber
Applies the specified steering to the vehicle this entity is attached to. Ignored if not attached to any entity.
StopBurning Extinguishes the entity fire, cancels all fire timers.
TakeDamage
DamageTypeeDamageType
AttackerEntitycEntity
RawDamagenumber
FinalDamagenumber
KnockbackAmountnumber
Causes this entity to take damage of the specified type, from the specified attacker (may be nil). The values are wrapped into a TakeDamageInfo structure and applied directly.
TakeDamage
DamageTypeeDamageType
AttackerEntitycEntity
RawDamagenumber
KnockbackAmountnumber
Causes this entity to take damage of the specified type, from the specified attacker (may be nil). The final damage is calculated from RawDamage using the currently equipped armor.
TakeDamage
AttackerEntitycEntity
Causes this entity to take damage that AttackerEntity would inflict. Includes their weapon and this entity's armor.
TeleportToCoords
PosXnumber
PosYnumber
PosZnumber
Teleports the entity to the specified coords. Asks plugins if the teleport is allowed.
TeleportToEntity
DestEntitycEntity
Teleports this entity to the specified destination entity. Asks plugins if the teleport is allowed.
Generated by APIDump on 2017-11-20 05:00:07, Build ID Unknown, Commit approx: c54bf40ef96806bf836db205f79e60d016b7eee9