EntityLivingBase

Usage

The only way to get an entity right now is through the following:
1
var entity = client.getAuraTarget()
Copied!
Or
1
for (var i = 0; i <= (world.getLivingEntities().size() - 1); i++) {
2
var entity = world.getLivingEntities().get(i)
3
...
4
...
5
}
Copied!

Functions

getName

1
var entityName = entity.getName()
Copied!
This will return a String containing the entity's name

getHealth

1
var entityHealth = entity.getHealth()
Copied!
This will return a Number with the entity's current health

getMaxHealth

1
var entityMaxHealth = entity.getMaxHealth()
Copied!
This will return a Number with the entity's max health

getPrevPosX

1
var prevPosX = entity.getPrevPosX()
Copied!
This will return a Number with the entity's previous position X value

getPrevPosY

1
var prevPosZ = entity.getPrevPosY()
Copied!
This will return a Number with the entity's previous position Y value

getPrevPosZ

1
var prevPosZ = entity.getPrevPosZ()
Copied!
This will return a Number with the entity's previous position Z value

getPosX

1
var posX = entity.getPosX()
Copied!
This will return a Number with the entity's position X value

getPosY

1
var posY = entity.getPosY()
Copied!
This will return a Number with the entity's position Y value

getPosZ

1
var posZ = entity.getPosZ()
Copied!
This will return a Number with the entity's position Z value

getMotionX

1
var motionX = entity.getMotionX()
Copied!
This will return a Number with the entity's motion X value

getMotionY

1
var motionY = entity.getMotionY()
Copied!
This will return a Number with the entity's motion Y value

getMotionZ

1
var motionZ = entity.getMotionZ()
Copied!
This will return a Number with the entity's motion Z value

isOnGround

1
var onGround = entity.isOnGround()
Copied!
This will return True if the entity is on ground

isCollidedHorizontally

1
var onGround = entity.isCollidedHorizontally()
Copied!
This will return True if the entity is is collided horizontally

isCollidedVertically

1
var onGround = entity.isCollidedVertically()
Copied!
This will return True if the entity is is collided vertically

isCollided

1
var onGround = entity.isCollided()
Copied!
This will return True if the entity is is collided

getHurtTime

1
var hurtTime = entity.getHurtTime()
Copied!
This will return a Number counting down from 10 when an entity is damaged
Last modified 3mo ago