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.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.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.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.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.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.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.getUUID

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

EntityAPI.isHamburger

figura.docs.entity.is_hamburger
overload 1:
user:isHamburger()
Method Property Fluent Description Representation
Return Value a Boolean

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.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.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.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.getFireTicks

figura.docs.entity.get_fire_ticks
overload 1:
user:getFireTicks()
Method Property Fluent Description Representation
Return Value an Integer

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.getAir

figura.docs.entity.get_air
overload 1:
user:getAir()
Method Property Fluent Description Representation
Return Value an Integer

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.isOnFire

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

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.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.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.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.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.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.isSilent

Returns true if this entity is silent
overload 1:
user:isSilent()
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.getEyeHeight

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

EntityAPI.isSprinting

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

EntityAPI.isGlowing

Returns true if this entity is currently glowing
overload 1:
user:isGlowing()
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.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.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 BlockState
overload 2:
user:getTargetedBlock(ignoreLiquids)
Method Property Fluent Description Representation
ignoreLiquids accepts a Boolean
Return Value a BlockState
overload 3:
user:getTargetedBlock(ignoreLiquids, distance)
Method Property Fluent Description Representation
ignoreLiquids accepts a Boolean
distance accepts a Number
Return Value a BlockState

EntityAPI.getVariable

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