Skip to content

Entity

addTag(tag: String) -> Null

Adds the tag tag to the entity. Similar to /tag add

canFreeze() -> Boolean

Returns whether the entity can freeze.

canUsePortals() -> Boolean

Returns whether the entity can use portals.

dismount() -> Null

Dismounts the entity from any vehicle it's riding.

extinguish(play_sound: Boolean) -> Null

Extinguishes the entity. Plays sound if play_sound is true.

getBlockPos() -> BlockPos

Returns the block pos of the entity.

getBlockX() -> Integer

Returns the x coordinate of the entity.

getBlockY() -> Integer

Returns the y coordinate of the entity.

getBlockZ() -> Integer

Returns the z coordinate of the entity.

getTags() -> List[String]

Returns the tags on the entity. Similar to /tag list.

getName() -> String

Returns the name of the entity.

getPassengers() -> List[Entity]

Returns the passengers riding the entity.

getVehicle() -> Entity

Returns the vehicle the entity is riding.

getX() -> Float

Returns the x coordinate of the entity.

getY() -> Float

Returns the y coordinate of the entity.

getZ() -> Float

Returns the z coordinate of the entity.

hasControllingPassenger() -> Boolean

Returns whether the passenger riding the entity is controlling.

hasNoGravity() -> Boolean

Returns whether the entity has no gravity.

hasPassenger(passenger: Entity) -> Boolean

Returns whether passenger is riding the entity.

hasPassengers() -> Boolean

Returns whether the entity has passengers.

hasVehicle() -> Boolean

Returns whether the entity is riding an entity.

isCrawling() -> Boolean

Returns whether the entity is crawling.

isDescending() -> Boolean

Returns whether the entity is descending.

isFireImmune() -> Boolean

Returns whether the entity is fire immune.

isFrozen() -> Boolean

Returns whether the entity is frozen.

isGlowing() -> Boolean

Returns whether the entity is glowing.

isInFluid() -> Boolean

Returns whether the entity is in a fluid.

isInLava() -> Boolean

Returns whether the entity is in lava.

isInsideWall() -> Boolean

Returns whether the entity is in inside a wall.

isInvisible() -> Boolean

Returns whether the entity is invisible.

isInvulnerable() -> Boolean

Returns whether the entity is invulnerable.

isOnFire() -> Boolean

Returns whether the entity is on fire.

isOnGround() -> Boolean

Returns whether the entity is on ground.

isOnRail() -> Boolean

Returns whether the entity is on a rail.

isSilent() -> Boolean

Returns whether the entity is silent.

isSneaking() -> Boolean

Returns whether the entity is sneaking.

isSprinting() -> Boolean

Returns whether the entity is sprinting.

isSwimming() -> Boolean

Returns whether the entity is swimming.

isTouchingWater() -> Boolean

Returns whether the entity is touching water.

isTouchingWaterOrRain() -> Boolean

Returns whether the entity is touching water or rain.

isWet() -> Boolean

Returns whether the entity is touching water, being rained on, or is inside a bubble column.

kill() -> Null

Kills the entity.

raycast(distance: Float, target: Block, check_fluids: Boolean) -> BlockHitResult

Raycasts distance until it hits target and if check_fluids is true and it encounters a fluid it will stop.

removePassengers() -> Null

Dismounts all passengers riding the entity.

removeTag(tag: String) -> Null

Removes the commandTag from the entity. Similar to /tag remove

resetPortalCooldown() -> Null

Resets the entity's portal cooldown.

sendMessage(contents: String) -> Null

Sends a message with contents contents to the entity.

setInvisible(invisible: Boolean) -> Null

Sets the entity to be invisible according to invisible.

setInvulnerable(invulnerable: Boolean) -> Null

Sets the entity to be invulnerable according to invulnerable.

setNoGravity(noGravity: Boolean) -> Null

Sets the entity to have no gravity according to noGravity.

setOnFire(onFire: Boolean) -> Null

Sets the entity to be on fire according to onFire.

setOnGround(onGround: Boolean) -> Null

Sets the entity to be on the ground according to onGround.

setPortalCooldown(portalCooldown: Integer) -> Null

Sets the entity's portal cooldown to portalCooldown.

setPos(x: Float, y: Float, z: Float) -> Null

Changes the entity's position according to x, y, and z.

setSilent(silent: Boolean) -> Null

Sets the entity to be silent according to silent.

setSneaking(sneaking: Boolean) -> Null

Sets the entity to be sneaking according to sneaking.

setSprinting(sprinting: Boolean) -> Null

Sets the entity to be sprinting according to sprinting.

setSwimming(swimming: Boolean) -> Null

Sets the entity to be swimming according to swimming.

shouldDismountUnderwater() -> Boolean

Returns whether the entity should dismount underwater.

stopRiding() -> Boolean

Makes the entity stop riding its vehicle.

teleport(x: Float, y: Float, z: Float) -> Null

Teleports the entity to x, y, and z.