Contents

This class represents a pickup entity (an item that the player or mobs can pick up). It is also
commonly known as "drops". With this class you could create your own "drop" or modify those
created automatically. The default lifetime of a pickup is 5 mins.

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.

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

Hitpoints

number

Heals the specified number of hitpoints. Hitpoints is expected to be a positive number.

IsA

ClassName

string

boolean

Returns true if the entity class is a descendant of the specified class name, or the specified class itself

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.

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.

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.

MoveToWorld

WorldName

string

ShouldSendRespawn

boolean

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.

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

Gravity

number

Sets the number that is used as the gravity for physics simulation. 1G (9.78) by default.

SetHeadYaw

HeadPitch

number

Sets the head pitch (FIXME: Rename to SetHeadPitch() ).

SetHealth

Hitpoints

number

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

NumTicks

number

Sets the amount of ticks for which the entity will not receive any damage from other entities.

SetIsFireproof

IsFireproof

boolean

Sets whether the entity receives damage from being on fire.

SetMass

Mass

number

Sets the mass of the entity. Currently unused.

SetMaxHealth

MaxHitpoints

number

Sets the maximum hitpoints of the entity. If current health is above MaxHitpoints, it is capped to MaxHitpoints.

SetPitch

Pitch

number

Sets the pitch (nose-down rotation) of the entity

SetPitchFromSpeed

Sets the entity pitch to match its speed (entity looking forwards as it moves)