Entity

open class Entity(entity: MCEntity)

Functions

Link copied to clipboard
fun addVelocity(x: Double, y: Double, z: Double): Entity
Link copied to clipboard
fun canBeCollidedWith(): Boolean
Link copied to clipboard
fun canBePushed(): Boolean
Link copied to clipboard
fun distanceTo(other: Entity): Float
fun distanceTo(blockPos: BlockPos): Float
fun distanceTo(other: MCEntity): Float
fun distanceTo(x: Float, y: Float, z: Float): Float
Link copied to clipboard
fun dropItem(item: Item, size: Int): EntityItem
Link copied to clipboard
fun extinguish(): Entity
Link copied to clipboard
fun getAir(): Int

Gets the entity's air level.

Link copied to clipboard
fun getChunk(): Chunk
Link copied to clipboard
fun getClassName(): String

Gets the Java class name of the entity, for example "EntityVillager"

Link copied to clipboard
fun getDimension(): Int
Link copied to clipboard
fun getDistanceWalked(): Float
Link copied to clipboard
fun getEyeHeight(): Float

Gets the height of the eyes on the entity, can be added to its Y coordinate to get the actual Y location of the eyes. This value defaults to 85% of an entity's height, however is different for some entities.

Link copied to clipboard
fun getEyePosition(partialTicks: Float): Vec3
Link copied to clipboard
fun getFireResistance(): Int
Link copied to clipboard
fun getHeight(): Float

Gets the entire height of the entity's hitbox

Link copied to clipboard
fun getLastX(): Double
Link copied to clipboard
fun getLastY(): Double
Link copied to clipboard
fun getLastZ(): Double
Link copied to clipboard
fun getLookVector(partialTicks: Float): Vec3
Link copied to clipboard
fun getMaxInPortalTime(): Int
Link copied to clipboard
fun getMotionX(): Double

Gets the entity's x motion. This is the amount the entity will move in the x direction next tick.

Link copied to clipboard
fun getMotionY(): Double

Gets the entity's y motion. This is the amount the entity will move in the y direction next tick.

Link copied to clipboard
fun getMotionZ(): Double

Gets the entity's z motion. This is the amount the entity will move in the z direction next tick.

Link copied to clipboard
open fun getName(): String

Gets the name of the entity, could be "Villager", or, if the entity has a custom name, it returns that.

Link copied to clipboard
fun getPitch(): Double

Gets the pitch, the horizontal direction the entity is facing towards. This has a range of -180 to 180.

Link copied to clipboard
fun getPos(): Vec3i
Link copied to clipboard
fun getRenderX(): Double
Link copied to clipboard
fun getRenderY(): Double
Link copied to clipboard
fun getRenderZ(): Double
Link copied to clipboard
fun getRider(): Entity?
Link copied to clipboard
fun getRiders(): List<Entity>
Link copied to clipboard
fun getRiding(): Entity?
Link copied to clipboard
fun getStepHeight(): Float
Link copied to clipboard
fun getTicksExisted(): Int
Link copied to clipboard
fun getUUID(): UUID

Gets the Java UUID object of this entity. Use of UUID.toString in conjunction is recommended.

Link copied to clipboard
fun getWidth(): Float

Gets the entire width of the entity's hitbox

Link copied to clipboard
fun getWorld(): World
Link copied to clipboard
fun getX(): Double
Link copied to clipboard
fun getY(): Double
Link copied to clipboard
fun getYaw(): Double

Gets the yaw, the vertical direction the entity is facing towards. This has a range of -180 to 180.

Link copied to clipboard
fun getZ(): Double
Link copied to clipboard
fun hasNoClip(): Boolean
Link copied to clipboard
fun isAirborne(): Boolean
Link copied to clipboard
fun isBurning(): Boolean
Link copied to clipboard
fun isCollided(): Boolean
Link copied to clipboard
fun isDead(): Boolean

Checks whether the entity is dead. This is a fairly loose term, dead for a particle could mean it has faded, while dead for an entity means it has no health.

Link copied to clipboard
fun isEating(): Boolean
Link copied to clipboard
fun isImmuneToFire(): Boolean
Link copied to clipboard
fun isInLava(): Boolean
Link copied to clipboard
fun isInvisible(): Boolean
Link copied to clipboard
fun isInWater(): Boolean
Link copied to clipboard
fun isOnGround(): Boolean
Link copied to clipboard
fun isOutsideBorder(): Boolean
Link copied to clipboard
fun isSilent(): Boolean
Link copied to clipboard
fun isSneaking(): Boolean
Link copied to clipboard
fun isSprinting(): Boolean
Link copied to clipboard
fun isWet(): Boolean
Link copied to clipboard
fun move(x: Double, y: Double, z: Double): Entity
Link copied to clipboard
fun setAir(air: Int): Entity
Link copied to clipboard
fun setAngles(yaw: Float, pitch: Float): Entity
Link copied to clipboard
fun setIsEating(eating: Boolean): Entity
Link copied to clipboard
fun setIsInvisible(invisible: Boolean): Entity
Link copied to clipboard
fun setIsOutsideBorder(outside: Boolean): Entity
Link copied to clipboard
fun setIsSilent(silent: Boolean): Entity
Link copied to clipboard
fun setIsSneaking(sneaking: Boolean): Entity
Link copied to clipboard
fun setIsSprinting(sprinting: Boolean): Entity
Link copied to clipboard
fun setOnFire(seconds: Int): Entity
Link copied to clipboard
fun setPosition(x: Double, y: Double, z: Double): Entity
Link copied to clipboard
open override fun toString(): String

Properties

Link copied to clipboard
val entity: MCEntity

Inheritors

Link copied to clipboard
Link copied to clipboard

Sources

Link copied to clipboard