entity
Entity related functions.
Assumes variable entity
is defined.
Example: Entity entity = client.getPlayer();
allowEditing
Returns whether the entity can edit the world or not.
distanceTo
Returns distance to a position in blocks.
distanceToGround
Returns the entity's distance to the ground.
distanceToSq
Returns distance to a position in blocks squared.
getAbsorption
Returns the entity's absorption.
getArmorInSlot
Returns a specified armor piece the entity is wearing.
getBlockPos
Returns the entity's block position.
getBPS
Returns the entity's blocks per second.
getDisplayName
Returns the entity's display name.
getFacing
Returns which direction the entity is facing.
getFallDistance
Returns the entity's fall distance.
getHealth
Returns the entity's health.
getHeight
Returns the entity's height.
getEyeHeight
Returns the entity's eye height.
getHeldItem
Returns the entity's held item.
getHurtTime
Returns the entity's hurt time.
getLastPosition
Returns the entity's previous position.
getMaxHealth
Returns the entity's max health.
getMaxHurtTime
Returns the entity's max hurt time.
getName
Returns the entity's name.
getNetworkPlayer
Returns the NetworkPlayerInfo of the entity. Only works on player entities.
getPitch
Returns the entity's pitch.
getPosition
Returns the entity's position.
getPotionEffects
Returns the entity's potion effects.
property | index | type |
---|---|---|
name | 0 | String |
amplifier | 1 | int |
duration | 2 | int |
getSpeed
Returns the entity's speed.
getSwingProgress
Returns the entity's swing animation progress.
getTicksExisted
Returns the entity's ticks existed.
getWidth
Returns the entity's width.
getYaw
Returns the entity's yaw.
isBurning
Returns whether the entity is burning or not.
isCollided
Returns whether the entity is collided or not.
isCollidedHorizontally
Returns whether the entity is collided Horizontally or not.
isCollidedVertically
Returns whether the entity is collided vertically or not.
isConsuming
Returns whether the entity is consuming or not.
isCreative
Returns whether the entity is in creative mode or not.
isDead
Returns whether the entity is dead or not.
isHoldingBlock
Checks whether the entity is holding a block or not.
isHoldingWeapon
Checks whether the entity is holding a weapon or not.
isInLava
Returns whether the entity is in lava or not.
isInLiquid
Returns whether the entity is in luquid or not.
isInvisible
Returns whether the entity is invisible or not.
isInWater
Returns whether the entity is in water or not.
isOnEdge
Returns whether the entity is on an edge or not.
isOnLadder
Returns whether the entity is on a ladder or not.
isRiding
Returns whether the entity is riding or not.
isSleeping
Returns whether the entity is sleeping or not.
isSneaking
Returns whether the entity is sneaking or not.
isSprinting
Returns whether the entity is sprinting or not.
isUsingItem
Returns whether the entity is using an item or not.
onGround
Returns whether the entity is on the ground or not.
setPitch
Sets the entity's pitch.
setPosition
Sets the entity's position.
setYaw
Sets the entity's yaw.
Last updated