user

An alias for player, just in case the user of your avatar isn't a player
(Foreshadowing?)
field signature:
user
Method Property Fluent Description Representation
Field Type an EntityAPI

EntityAPI.getName

Gets the name of this entity, if it has a custom name
If it doesn't,
returns a translated form of getType()
overload 1:
user:getName()
Method Property Fluent Description Representation
Return Value a String

EntityAPI.isAlive

Returns whether this entity is alive or not
overload 1:
user:isAlive()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.getType

Gets the Minecraft identifier of this entity
For instance,
"minecraft:pig"
overload 1:
user:getType()
Method Property Fluent Description Representation
Return Value a String

EntityAPI.isLoaded

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:
user:isLoaded()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.getItem

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:
user:getItem(index)
Method Property Fluent Description Representation
index accepts an Integer
Return Value either an ItemStack or nil

EntityAPI.isSprinting

Returns true if this entity is currently sprinting
overload 1:
user:isSprinting()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.isSilent

Returns true if this entity is silent
overload 1:
user:isSilent()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.isCrouching

Returns true if this entity is visually sneaking
overload 1:
user:isCrouching()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.isOnFire

Returns true if this entity is currently on fire
overload 1:
user:isOnFire()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.isInvisible

Returns true if this entity is invisible, for one reason or another
overload 1:
user:isInvisible()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.getPassengers

Returns a List of entities of all passengers this entity has
overload 1:
user:getPassengers()
Method Property Fluent Description Representation
Return Value a table

EntityAPI.isSneaking

Returns true if this entity is logically sneaking (can't fall from blocks edges, can't see nameplate behind walls, etc)
overload 1:
user:isSneaking()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.getEyeY

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:
user:getEyeY()
Method Property Fluent Description Representation
Return Value a Number

EntityAPI.isGlowing

Returns true if this entity is currently glowing
overload 1:
user:isGlowing()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.hasContainer

Checks if the entity has a container (Chest Boats, Minecarts with Chests, …)
overload 1:
user:hasContainer()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.hasInventory

Checks if the entity has an inventory (Horses, Camels, LLamas, …)
overload 1:
user:hasInventory()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.getTargetedBlock

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:
user:getTargetedBlock()
Method Property Fluent Description Representation
Return Value a Varargs
overload 2:
user:getTargetedBlock(ignoreLiquids)
Method Property Fluent Description Representation
ignoreLiquids accepts a Boolean
Return Value a Varargs
overload 3:
user:getTargetedBlock(ignoreLiquids, distance)
Method Property Fluent Description Representation
ignoreLiquids accepts a Boolean
distance accepts a Number
Return Value a Varargs

EntityAPI.getTargetedEntity

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:
user:getTargetedEntity()
Method Property Fluent Description Representation
Return Value a Varargs
overload 2:
user:getTargetedEntity(distance)
Method Property Fluent Description Representation
distance accepts a Number
Return Value a Varargs

EntityAPI.getVariable

Gets the value of a variable this entity stored in themselves using the Avatar API's store() function
overload 1:
user:getVariable()
Method Property Fluent Description Representation
Return Value anything
overload 2:
user:getVariable(key)
Method Property Fluent Description Representation
key accepts a String
Return Value anything

EntityAPI.isLiving

Gets if this entity is a Living Entity
overload 1:
user:isLiving()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.isPlayer

Gets if this entity is a Player Entity
overload 1:
user:isPlayer()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.getNbt

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:
user:getNbt()
Method Property Fluent Description Representation
Return Value a table

EntityAPI.getPermissionLevel

Returns the permission level number of this entity
Server Operators,
by default, have the permission level of 4
overload 1:
user:getPermissionLevel()
Method Property Fluent Description Representation
Return Value an Integer

EntityAPI.getPos

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:
user:getPos()
Method Property Fluent Description Representation
Return Value a Vector3
overload 2:
user:getPos(delta)
Method Property Fluent Description Representation
delta accepts a Number
Return Value a Vector3

EntityAPI.getUUID

Gets the UUID of the proxied entity
overload 1:
user:getUUID()
Method Property Fluent Description Representation
Return Value a String

EntityAPI.getVelocity

Gets the current velocity of this entity in world coordinates, calculated as its position this tick minus its position last tick
overload 1:
user:getVelocity()
Method Property Fluent Description Representation
Return Value a Vector3

EntityAPI.getLookDir

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:
user:getLookDir()
Method Property Fluent Description Representation
Return Value a Vector3

EntityAPI.getRot

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:
user:getRot()
Method Property Fluent Description Representation
Return Value a Vector2
overload 2:
user:getRot(delta)
Method Property Fluent Description Representation
delta accepts a Number
Return Value a Vector2

EntityAPI.isInWater

Returns true if this entity is currently in a water block, including waterlogging
overload 1:
user:isInWater()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.isUnderwater

Returns true if this entity's eyes are touching water
overload 1:
user:isUnderwater()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.getVehicle

Returns a proxy for the entity that this player is currently riding
If the player isn't riding anything,
returns nil
overload 1:
user:getVehicle()
Method Property Fluent Description Representation
Return Value either an EntityAPI or nil

EntityAPI.isInRain

Returns true if this entity is currently standing in rain
overload 1:
user:isInRain()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.getBoundingBox

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:
user:getBoundingBox()
Method Property Fluent Description Representation
Return Value a Vector3

EntityAPI.isInLava

Returns true if this entity is currently in lava
overload 1:
user:isInLava()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.isWet

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:
user:isWet()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.hasAvatar

Returns true if Figura has an avatar loaded for this entity
overload 1:
user:hasAvatar()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.getPose

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:
user:getPose()
Method Property Fluent Description Representation
Return Value a String

EntityAPI.getMaxAir

Gets the maximum amount of air this entity can have
overload 1:
user:getMaxAir()
Method Property Fluent Description Representation
Return Value an Integer

EntityAPI.getFrozenTicks

Gets the number of ticks this entity has been freezing in powder snow for
overload 1:
user:getFrozenTicks()
Method Property Fluent Description Representation
Return Value an Integer

EntityAPI.getEyeHeight

Returns the current eye height of this entity
overload 1:
user:getEyeHeight()
Method Property Fluent Description Representation
Return Value a Number

EntityAPI.isOnGround

Returns whether or not this entity is currently on the ground
overload 1:
user:isOnGround()
Method Property Fluent Description Representation
Return Value a Boolean

EntityAPI.getDimensionName

Gets the Minecraft identifier of the dimension this entity is in
overload 1:
user:getDimensionName()
Method Property Fluent Description Representation
Return Value a String

EntityAPI.getControllingPassenger

Returns the entity that is controlling this entity
overload 1:
user:getControllingPassenger()
Method Property Fluent Description Representation
Return Value an EntityAPI

EntityAPI.getControlledVehicle

Return the vehicle that this entity is controlling
overload 1:
user:getControlledVehicle()
Method Property Fluent Description Representation
Return Value an EntityAPI
a a