Buy Me a Coffee at ko-fi.com

Acts as a proxy for an entity in the Minecraft world

Returns the size of this entity's bounding box as a Vector3
{x, y, z} are the width, height, and width
Minecraft entity hitboxes always have square bases

overload 1:
EntityAPI.getBoundingBox(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Return the vehicle that this entity is controlling

overload 1:
EntityAPI.getControlledVehicle(): EntityAPI
typings.1263373079
Method PropertyFluent DescriptionRepresentation
Return Value

Returns the entity that is controlling this entity

overload 1:
EntityAPI.getControllingPassenger(): EntityAPI
typings.1263373079
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the Minecraft identifier of the dimension this entity is in

overload 1:
EntityAPI.getDimensionName(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Returns the current eye height of this entity

overload 1:
EntityAPI.getEyeHeight(): Number
typings.-1950496919
Method PropertyFluent DescriptionRepresentation
Return Value

Returns the Y level of this entity's eyes
Not to be confused with getEyeHeight, this function also takes the entity itself's Y position into account

overload 1:
EntityAPI.getEyeY(): Number
typings.-1950496919
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the number of ticks this entity has been freezing in powder snow for

overload 1:
EntityAPI.getFrozenTicks(): Integer
typings.-672261858
Method PropertyFluent DescriptionRepresentation
Return Value

Gets an ItemStack for the item in the given slot
For the player, slots are indexed with 1 as the main hand, 2 as the off hand, and 3,4,5,6 as the 4 armor slots from the boots to the helmet
If an invalid slot number is given, this will return nil

overload 1:
EntityAPI.getItem(index: Integer): ItemStack | nil
typings.-672261858typings.59683746
Method PropertyFluent DescriptionRepresentation
index accepts
Return Value

Returns a unit vector pointing in the direction that this entity is looking
See the blue line in the F3+B screen for an example

overload 1:
EntityAPI.getLookDir(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the maximum amount of air this entity can have

overload 1:
EntityAPI.getMaxAir(): Integer
typings.-672261858
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the name of this entity, if it has a custom name
If it doesn't, returns a translated form of getType()

overload 1:
EntityAPI.getName(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Gets a table containing the NBT of this entity
Please note that not all values in the entity's NBT may be synced, as some are handled only on the server side

overload 1:
EntityAPI.getNbt(): Table
typings.80563118
Method PropertyFluent DescriptionRepresentation
Return Value

Returns the closest entity to this entity
If `type` is an entity id, (e.g. `minecraft:bee`), only entities of that type will be considered
Radius defaults to 20, and controls the size of the area for checking entities as a box expanding in every direction from the player

overload 1:
EntityAPI.getNearestEntity(type: String, radius: Number): EntityAPI
typings.-1808118735typings.-1950496919typings.1263373079
Method PropertyFluent DescriptionRepresentation
type accepts
radius accepts
Return Value
overload 2:
EntityAPI.getNearestEntity(type: String): EntityAPI
typings.-1808118735typings.1263373079
Method PropertyFluent DescriptionRepresentation
type accepts
Return Value
overload 3:
EntityAPI.getNearestEntity(): EntityAPI
typings.1263373079
Method PropertyFluent DescriptionRepresentation
Return Value

Returns a List of entities of all passengers this entity has

overload 1:
EntityAPI.getPassengers(): Table
typings.80563118
Method PropertyFluent DescriptionRepresentation
Return Value

Returns the permission level number of this entity
Server Operators, by default, have the permission level of 4

overload 1:
EntityAPI.getPermissionLevel(): Integer
typings.-672261858
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the position of the entity in the world
If delta is passed in, then it will be used to linearly interpolate the position of the entity between the previous tick and the current tick
The default value of delta is 1

overload 1:
EntityAPI.getPos(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value
overload 2:
EntityAPI.getPos(delta: Number): Vector3
typings.-1950496919typings.2002444080
Method PropertyFluent DescriptionRepresentation
delta accepts
Return Value

Returns the current pose of the player
This can be one of: "STANDING", "FALL_FLYING", "SLEEPING", "SWIMMING", "SPIN_ATTACK", "CROUCHING", "LONG_JUMPING", or "DYING"

overload 1:
EntityAPI.getPose(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the rotation of the entity in degrees
If delta is passed in, then it will be used to linearly interpolate the rotation of the entity between the previous tick and the current tick
The default value of delta is 1

overload 1:
EntityAPI.getRot(): Vector2
typings.2002444079
Method PropertyFluent DescriptionRepresentation
Return Value
overload 2:
EntityAPI.getRot(delta: Number): Vector2
typings.-1950496919typings.2002444079
Method PropertyFluent DescriptionRepresentation
delta accepts
Return Value

Returns a proxy for your currently targeted BlockState
This BlockState appears on the F3 screen
The maximum (and default) distance is 20, minimum is -20
Returns the block, the hit position, and the targeted block face as three separate values

overload 1:
EntityAPI.getTargetedBlock(): Varargs
typings.1901216868
Method PropertyFluent DescriptionRepresentation
Return Value
overload 2:
EntityAPI.getTargetedBlock(ignoreLiquids: Boolean): Varargs
typings.1729365000typings.1901216868
Method PropertyFluent DescriptionRepresentation
ignoreLiquids accepts
Return Value
overload 3:
EntityAPI.getTargetedBlock(ignoreLiquids: Boolean, distance: Number): Varargs
typings.1729365000typings.-1950496919typings.1901216868
Method PropertyFluent DescriptionRepresentation
ignoreLiquids accepts
distance accepts
Return Value

Returns a proxy for your currently targeted Entity
This Entity appears on the F3 screen
Maximum and Default distance is 20, Minimum is 0

overload 1:
EntityAPI.getTargetedEntity(): Varargs
typings.1901216868
Method PropertyFluent DescriptionRepresentation
Return Value
overload 2:
EntityAPI.getTargetedEntity(distance: Number): Varargs
typings.-1950496919typings.1901216868
Method PropertyFluent DescriptionRepresentation
distance accepts
Return Value

Gets the Minecraft identifier of this entity
For instance, "minecraft:pig"

overload 1:
EntityAPI.getType(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the UUID of the proxied entity

overload 1:
EntityAPI.getUUID(): String
typings.-1808118735
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the value of a variable this entity stored in themselves using the Avatar API's store() function

overload 1:
EntityAPI.getVariable(): AnyType
typings.821772070
Method PropertyFluent DescriptionRepresentation
Return Value
overload 2:
EntityAPI.getVariable(key: String): AnyType
typings.-1808118735typings.821772070
Method PropertyFluent DescriptionRepresentation
key accepts
Return Value

Returns a proxy for the entity that this player is currently riding
If the player isn't riding anything, returns nil

overload 1:
EntityAPI.getVehicle(): EntityAPI | nil
typings.-572044764
Method PropertyFluent DescriptionRepresentation
Return Value

Gets the current velocity of this entity in world coordinates, calculated as its position this tick minus its position last tick

overload 1:
EntityAPI.getVelocity(): Vector3
typings.2002444080
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if Figura has an avatar loaded for this entity

overload 1:
EntityAPI.hasAvatar(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Checks if the entity has a container (Chest Boats, Minecarts with Chests, …)

overload 1:
EntityAPI.hasContainer(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Checks if the entity has an inventory (Horses, Camels, LLamas, …)

overload 1:
EntityAPI.hasInventory(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns whether this entity is alive or not

overload 1:
EntityAPI.isAlive(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this entity is visually sneaking

overload 1:
EntityAPI.isCrouching(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this entity has negative Y-velocity and is not on the ground

overload 1:
EntityAPI.isFalling(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this entity is currently glowing

overload 1:
EntityAPI.isGlowing(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this entity is currently in lava

overload 1:
EntityAPI.isInLava(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this entity is currently standing in rain

overload 1:
EntityAPI.isInRain(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this entity is currently in a water block, including waterlogging

overload 1:
EntityAPI.isInWater(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this entity is invisible, for one reason or another

overload 1:
EntityAPI.isInvisible(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Gets if this entity is a Living Entity

overload 1:
EntityAPI.isLiving(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Checks if this entity object is still being updated and loaded
A non-loaded entity would be someone or something which is in another dimension or out of the render distance for example

overload 1:
EntityAPI.isLoaded(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this entity has some velocity
Takes a boolean parameter, where if true, the y velocity is ignored

overload 1:
EntityAPI.isMoving(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value
overload 2:
EntityAPI.isMoving(ignoreY: Boolean): Boolean
typings.1729365000typings.1729365000
Method PropertyFluent DescriptionRepresentation
ignoreY accepts
Return Value

Returns true if this entity is currently on fire

overload 1:
EntityAPI.isOnFire(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns whether or not this entity is currently on the ground

overload 1:
EntityAPI.isOnGround(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Gets if this entity is a Player Entity

overload 1:
EntityAPI.isPlayer(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this entity is silent

overload 1:
EntityAPI.isSilent(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this entity is logically sneaking (can't fall from blocks edges, can't see nameplate behind walls, etc)

overload 1:
EntityAPI.isSneaking(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this entity is currently sprinting

overload 1:
EntityAPI.isSprinting(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true if this entity's eyes are touching water

overload 1:
EntityAPI.isUnderwater(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value

Returns true in any of three conditions: if the entity is in water, if the entity is in rain, or if the entity is in a bubble column
Otherwise, returns false

overload 1:
EntityAPI.isWet(): Boolean
typings.1729365000
Method PropertyFluent DescriptionRepresentation
Return Value