entity

Entity related functions.

Assumes variable entity is defined.

Example: Entity entity = client.getPlayer();

allowEditing

boolean allowEditing = entity.allowEditing();

Returns whether the entity can edit the world or not.

distanceTo

double distance = entity1.getPosition().distanceTo(entity2.getPosition());

Returns distance to a position in blocks.

distanceToGround

double distance = entity1.distanceToGround();

Returns the entity's distance to the ground.

distanceToSq

double distanceSquared = entity1.getPosition().distanceToSq(entity2.getPosition());

Returns distance to a position in blocks squared.

getAbsorption

float absorption = entity.getAbsorption();

Returns the entity's absorption.

getArmorInSlot

ItemStack armor = entity.getArmorInSlot(int slot);

Returns a specified armor piece the entity is wearing.

getBlockPos

Vec3 blockPosition = entity.getBlockPosition();

Returns the entity's block position.

getBPS

double bps = entity.getBPS();

Returns the entity's blocks per second.

getDisplayName

String displayName = entity.getDisplayName();

Returns the entity's display name.

getFacing

String facing = entity.getFacing();

Returns which direction the entity is facing.

getFallDistance

float fallDistance = entity.getFallDistance();

Returns the entity's fall distance.

getHealth

float health = entity.getHealth();

Returns the entity's health.

getHeight

float height = entity.getHeight();

Returns the entity's height.

getEyeHeight

float eyeHeight = entity.getEyeHeight();

Returns the entity's eye height.

getHeldItem

ItemStack item = player.getHeldItem();

Returns the entity's held item.

getHurtTime

int hurtTime = entity.getHurtTime();

Returns the entity's hurt time.

getLastPosition

Vec3 lastPosition = entity.getLastPosition();

Returns the entity's previous position.

getMaxHealth

float maxHealth = entity.getMaxHealth();

Returns the entity's max health.

getMaxHurtTime

int maxHurtTime = entity.getMaxHurtTime();

Returns the entity's max hurt time.

getName

String name = entity.getName();

Returns the entity's name.

getNetworkPlayer

NetworkPlayer networkPlayer = entity.getNetworkPlayer();

Returns the NetworkPlayerInfo of the entity. Only works on player entities.

getPitch

float pitch = entity.getPitch();

Returns the entity's pitch.

getPosition

Vec3 position = entity.getPosition();

Returns the entity's position.

getPotionEffects

List<Object[]> effects = entity.getPotionEffects();

Returns the entity's potion effects.

propertyindextype

name

0

String

amplifier

1

int

duration

2

int

getSpeed

double speed = entity.getSpeed();

Returns the entity's speed.

getSwingProgress

double swingProgress = entity.getSwingProgress();

Returns the entity's swing animation progress.

getTicksExisted

int ticksExisted = entity.getTicksExisted();

Returns the entity's ticks existed.

getWidth

float width = entity.getWidth();

Returns the entity's width.

getYaw

float yaw = entity.getYaw();

Returns the entity's yaw.

isBurning

boolean burning = entity.isBurning();

Returns whether the entity is burning or not.

isCollided

boolean collided = entity.isCollided();

Returns whether the entity is collided or not.

isCollidedHorizontally

boolean collidedHorizontally = entity.isCollidedHorizontally();

Returns whether the entity is collided Horizontally or not.

isCollidedVertically

boolean collidedVertically = entity.isCollidedVertically();

Returns whether the entity is collided vertically or not.

isConsuming

boolean consuming = entity.isConsuming();

Returns whether the entity is consuming or not.

isCreative

boolean creative = entity.isCreative();

Returns whether the entity is in creative mode or not.

isDead

boolean dead = entity.isDead();

Returns whether the entity is dead or not.

isHoldingBlock

boolean holdingBlock = entity.isHoldingBlock();

Checks whether the entity is holding a block or not.

isHoldingWeapon

boolean holdingWeapon = client.isHoldingWeapon();

Checks whether the entity is holding a weapon or not.

isInLava

boolean inLava = entity.isInLava();

Returns whether the entity is in lava or not.

isInLiquid

boolean inLiquid = entity.isInLiquid();

Returns whether the entity is in luquid or not.

isInvisible

boolean invisible = entity.isInvisible();

Returns whether the entity is invisible or not.

isInWater

boolean inWater = entity.isInWater();

Returns whether the entity is in water or not.

isOnEdge

boolean isOnEdge = entity.isOnEdge();

Returns whether the entity is on an edge or not.

isOnLadder

boolean onLadder = entity.isOnLadder();

Returns whether the entity is on a ladder or not.

isRiding

boolean riding = entity.isRiding();

Returns whether the entity is riding or not.

isSleeping

boolean sleeping = entity.isSleeping();

Returns whether the entity is sleeping or not.

isSneaking

boolean sneaking = entity.isSneaking();

Returns whether the entity is sneaking or not.

isSprinting

boolean sprinting = entity.isSprinting();

Returns whether the entity is sprinting or not.

isUsingItem

boolean usingItem = entity.isUsingItem();

Returns whether the entity is using an item or not.

onGround

boolean onGround = entity.onGround();

Returns whether the entity is on the ground or not.

setPitch

entity.setPitch(float pitch);

Sets the entity's pitch.

setPosition

entity.setPosition(Vec3 position);

Sets the entity's position.

setYaw

entity.setYaw(float yaw);

Sets the entity's yaw.

Last updated