FluxWareScripting
Back to site

entity

Accessors for an entity handle. entity.pos(e) and e:pos() are the same call.

Functions

15 functions. Signatures are generated from the client, so they describe the build you are running.

entity.pos(e:Entity) -> x:number, y:number, z:number
entity.lastPos(e:Entity) -> x:number, y:number, z:number

Position at the start of the tick, for interpolation.

entity.velocity(e:Entity) -> x:number, y:number, z:number
entity.rotation(e:Entity) -> yaw:number, pitch:number
entity.name(e:Entity) -> string
entity.type(e:Entity) -> string

Registry id, e.g. 'minecraft:zombie'.

entity.health(e:Entity) -> number

nil for entities that have no health, such as items.

entity.maxHealth(e:Entity) -> number
entity.absorption(e:Entity) -> number
entity.distance(e:Entity) -> number

From the local player.

entity.isPlayer(e:Entity) -> boolean
entity.isLiving(e:Entity) -> boolean
entity.isFriend(e:Entity) -> boolean

Honours the client's friend list.

entity.isValid(e:Entity) -> boolean

False once the entity is gone. Always check a cached handle.

entity.boundingBox(e:Entity) -> table

{minX, minY, minZ, maxX, maxY, maxZ}.