🤠
cedoscript
  • Introduction
  • Documentation
    • Packets
    • Setting Command
    • Java Imports
    • Examples
      • Creating a Pack
      • Custom Block Animation
      • Bhop
      • Setting Creation
      • Post Notification
      • Gradient Round Rectangle
      • Applying a gradient
      • Simulate a command
  • api
    • Events
    • Settings
    • Objects
      • EntityLivingBase
      • ItemStack
      • Player Abilities
      • Color
      • TimerUtil
      • Continual Animation
      • ShaderUtil
      • FrameBuffer
      • Rainbow
      • Drag
      • Pair
      • Module
  • Bindings
    • Client
    • Player
    • Packet
    • Action
    • Facing
    • Potion
    • Notification
    • Render
    • Stats
    • Font
    • User
    • World
Powered by GitBook
On this page
  • Usage
  • Functions
  • getName
  • getHealth
  • getMaxHealth
  • getPrevPosX
  • getPrevPosY
  • getPrevPosZ
  • getPosX
  • getPosY
  • getPosZ
  • getMotionX
  • getMotionY
  • getMotionZ
  • isOnGround
  • isCollidedHorizontally
  • isCollidedVertically
  • isCollided
  • isOnLadder
  • getTotalArmorValue
  • getHeldItem
  • getHurtTime
  • getEquipmentInSlot
  • getRotationYawHead
  • getRotationPitchHead
  • getAbsorptionAmount
  • getUUID
  • isMob
  • isAnimal

Was this helpful?

  1. api
  2. Objects

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()

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)
Name
Type
Description

slot

Number

0: Tool in Hand; 1-4: Armor

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();

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

PreviousObjectsNextItemStack

Last updated 2 years ago

Was this helpful?

Returns an object of the entity's currently held item

Returns an

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

ItemStack
ItemStack
UUID