IMobEntity
Represents an instance of a mob. This includes friendly mobs (e.g.: sheep, cow) and aggressive mobs (e.g.: zombie, skeleton).
Methods
Properties
IsPassive
MobType
GetHealth
EntityId
IsDead
Position
GetAge
Rotation
HasLineOfSight
Effects
Attack
Equipment
Interact
HasDespawned
LookAt
HasMoved
LookAtSmooth
MoveTo
MoveToRange
Follow
Methods
GetHealth
Returns the health of this mob. Note: the Health is measured 0 (aka dead) up to 20 (full health), not up to 10 like Minecraft's visual indicators.
IsDead
Returns whether this mob is dead.
GetAge
Returns the number of ticks that this mob has existed for. This starts counting up as soon as this mob is sent to the bot by the server (time since render). Each tick in this case refers to a Minecraft tick, which is 50ms per tick.
HasLineOfSight
Returns whether the bot has direct line of sight to this mob. This only works if the mob is within 64 blocks of the bot. You can optionally specify a specific body part to test against (default is BodyParts.Body).
Attack
Attacks this mob. This does not move the bot to range, nor does it rotate the bots head to face the mob. Note: to be anti-cheat compliant, you must first use the LookAt function to look at the mob before hitting it.
Interact
Right-clicks this mob. This does not move the bot to range, nor does it rotate the bots head to face the mob. Note: To be anti-cheat compliant, you must first use the LookAt function to look at the mob before hitting it.
LookAt
Rotates the bots head to look at the mob. This can be used to look at a specific part of the mob, such as the head, feet, or the body (default is BodyParts.Body). Returns a Task that lasts around 1 tick, which is how long it takes the server to update the players rotation.
LookAtSmooth
Smoothly (slowly, per multiple ticks) rotates the bots head to look at the mob. This can be used to look at a specific part of the mob, such as the head, feet, or the body (default is BodyParts.Body). You should await for this function to complete, as the rotation time is dynamic. You can optionally specify the look speed, however it is recommended to leave it as 'auto'.
MoveTo
Attempts to move the location of this player. This is a wrapper function for Player.MoveTo, for more information check that.
MoveToRange
Attempts to move the bot into the specified range of this player. You must specify the max distance that we can be from this player to still be considered in range. This is a wrapper function for Player.MoveToRange, for more information check that.
Follow
Attempts to move the location of this mob, if the mob moves then the path is recalculated and updated. This is a wrapper function for Player.FollowEntity, for more information check that.
Last updated