EntityLivingBase

Usage

The only way to get an entity right now is through the following:

var entity = client.getAuraTarget()

Or

for (var i = 0; i <= (world.getLivingEntities().size() - 1); i++) {
        var entity = world.getLivingEntities().get(i)
        ...
        ...
}

Functions

getName

var entityName = entity.getName()

This will return a String containing the entity's name

getHealth

var entityHealth = entity.getHealth()

This will return a Number with the entity's current health

getMaxHealth

var entityMaxHealth = entity.getMaxHealth()

This will return a Number with the entity's max health

getPrevPosX

var prevPosX = entity.getPrevPosX()

This will return a Number with the entity's previous position X value

getPrevPosY

var prevPosZ = entity.getPrevPosY()

This will return a Number with the entity's previous position Y value

getPrevPosZ

var prevPosZ = entity.getPrevPosZ()

This will return a Number with the entity's previous position Z value

getPosX

var posX = entity.getPosX()

This will return a Number with the entity's position X value

getPosY

var posY = entity.getPosY()

This will return a Number with the entity's position Y value

getPosZ

var posZ = entity.getPosZ()

This will return a Number with the entity's position Z value

getMotionX

var motionX = entity.getMotionX()

This will return a Number with the entity's motion X value

getMotionY

var motionY = entity.getMotionY()

This will return a Number with the entity's motion Y value

getMotionZ

var motionZ = entity.getMotionZ()

This will return a Number with the entity's motion Z value

isOnGround

var onGround = entity.isOnGround()

This will return True if the entity is on ground

isCollidedHorizontally

var onGround = entity.isCollidedHorizontally()

This will return True if the entity is is collided horizontally

isCollidedVertically

var onGround = entity.isCollidedVertically()

This will return True if the entity is is collided vertically

isCollided

var onGround = entity.isCollided()

This will return True if the entity is is collided

isOnLadder

var onLadder = entity.isOnLadder()

This will return True if the entity is is on a ladder

getTotalArmorValue

var armorValue = entity.getTotalArmorValue()

Gets the total value of the armor the entity currently has on

getHeldItem

var heldItem = entity.getHeldItem()

Returns an ItemStack object of the entity's currently held item

getHurtTime

var hurtTime = entity.getHurtTime()

This will return a Number counting down from 10 when an entity is damaged

getEquipmentInSlot

var equipment = entity.getEquipmentInSlot(4)

Returns an ItemStack

getRotationYawHead

var yawHead = entity.getRotationYawHead();

Returns the yaw of the entity's head as a Number

getRotationPitchHead

var pitchHead = entity.getRotationPitchHead();

Returns the pitch of the entity's head as a Number

getAbsorptionAmount

var yawHead = entity.getAbsorptionAmount();

Returns the absorption amount of the entity as a Number

getUUID

var uuid = entity.getUUID();

Returns a UUID object. Returns null if UUID does not exist or cannot be found.

This will not work if the entity is not a Player. i.e a mob or animal

isMob

var mob = entity.isMob();

Returns True if the entity is a mob

isAnimal

var animal = entity.isAnimal();

Returns True if the entity is an animal

Last updated