====== cEntity ======
A cEntity object represents an object in the world, it has a position and orientation. cEntity is an abstract class, and can not be instantiated directly, instead, all entities are implemented as subclasses. The cEntity class works as the common interface for the operations that all (most) entities support.

All cEntity objects have an Entity Type so it can be determined what kind of entity it is efficiently. Entities also have a class inheritance awareness, they know their class name, their parent class' name and can decide if there is a class within their inheritance chain. Since these functions operate on strings, they are slightly slower than checking the entity type directly, on the other hand, they are more specific (compare etMob vs "cSpider" class name).

Note that you should not store a cEntity object between two hooks' calls, because MCServer may remove that entity in between the calls. If you need to refer to an entity later, use its UniqueID and [[API:cWorld|cWorld]]'s entity manipulation functions to access the entity.

===== Class Definition =====
^ Function ^ Parameters ^ Return type ^ Notes ^
| Destroy | | | Schedules the entity to be destroyed |
| GetChunkX | | number | Returns the X-coord of the chunk in which the entity is placed |
| GetChunkY | | number | Returns the Y-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 "spider" or "pickup" |
| GetClassStatic | | string | Returns the entity classname that this class implements. Each descendant overrides this function. Is static |
| GetEntityType | | cEntity.eEntityType | Returns the type of the entity, one of the etXXX constants |
| GetLookVector | | Vector3f | Returns the vector that defines the direction in which the entity is looking |
| GetParentClass | | string | Returns the name of the direct parent class for this entity |
| GetPitch | | number | Returns the pitch (nose-down rotation) of the entity |
| 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 |
| GetRoll | | number | Returns the roll (sideways rotation) of the entity |
| GetRot | | Vector3f | Returns the entire rotation vector (Rotation, Pitch, Roll) |
| GetRotation | | number | Returns the rotation (direction) of the entity |
| 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 |
| GetUniqueID | | number | Returns the ID that uniquely identifies the entity |
| GetWorld | | [[API:cWorld]] | Returns the world where the entity resides |
| IsA | ClassName | bool | Returns true if the entity class is a descendant of the specified class name, or the specified class itself |
| IsCrouched | | bool | Returns true if the entity is crouched. False for entities that don't support crouching |
| IsDestroyed | | bool | Returns true if the entity has been destroyed and is awaiting removal from the internal structures |
| IsMinecart | | bool | Returns true if the entity represents a minecart |
| IsMob | | bool | Returns true if the entity represents any mob |
| IsOnFire | | bool | Returns true if the entity is on fire |
| IsPickup | | bool | Returns true if the entity represents a pickup |
| IsPlayer | | bool | Returns true if the entity represents a player |
| IsTNT | | bool | Returns true if the entity represents a TNT entity |
| IsRclking | | bool | Currently unimplemented |
| IsSprinting | | bool | Returns true if the entity is sprinting. ENtities that cannot sprint return always false |
| SetPitch | number | | Sets the pitch (nose-down rotation) of the entity |
| SetPosX | number | | Sets the X-coord of the entity's pivot |
| SetPosY | number | | Sets the Y-coord of the entity's pivot |
| SetPosZ | number | | Sets the Z-coord of the entity's pivot |
| SetPosition | X, Y, Z | | Sets all three coords of the entity's pivot |
| SetPosition | [[API:Vector3d|Vector3d]] | | ::: |
| SetRoll | number | | Sets the roll (sideways rotation) of the entity |
| SetRot | [[API:Vector3f|Vector3f]] | | Sets the entire rotation vector (Rotation, Pitch, Roll) |
| SetRotation | number | | Sets the rotation (direction) of the entity |

^ eEntityType enum value ^ Specialized class ^ Meaning ^
| etEntity | N/A | Any entity that doesn't have a specialized type |
| etPlayer | [[API:cPlayer|cPlayer]] | A player |
| etPickup | [[API:cPickup|cPickup]] | A pickup |
| etMob | [[API:cMonster|cMonster]] and descendants | Any mob |
| etFallingBlock | [[API:cFallingBlock|cFallingBlock]] | A falling block, such as sand or gravel |
| etMinecart | [[API:cMinecart|cMinecart]] | A minecart (with any cargo) |
| etTNT | [[API:cTNTEntity|cTNTEntity]] | A (primed) TNT Entity |

^ cEntity status enum ^
| ENTITY_STATUS_HURT |
| ENTITY_STATUS_DEAD |
| ENTITY_STATUS_WOLF_TAMING |
| ENTITY_STATUS_WOLF_TAMED |
| ENTITY_STATUS_WOLF_SHAKING |
| ENTITY_STATUS_EATING_ACCEPTED |
| ENTITY_STATUS_SHEEP_EATING |