#[non_exhaustive]pub enum Error {
Show 36 variants
Disconnected,
Timeout,
Teleported,
Died,
NotLoaded(BlockPos),
NothingToDig(BlockPos),
Unbreakable(BlockPos),
OutOfReach(BlockPos),
LostTarget(BlockPos),
Occupied(BlockPos),
NoSupport(BlockPos),
WouldActivate(BlockPos),
NotPlaced(BlockPos),
NothingHeld,
NoSuchItem(String),
UnknownItem(String),
UnknownBlock(String),
NoWindow,
Click(ClickError),
ClickRejected,
ClickTimedOut,
CannotUse,
Cancelled,
Panicked(String),
NoSuchEntity(i32),
NoPath,
Stuck,
NotRideable(i32),
EntityOutOfReach(i32),
NotSeated(i32),
NotRiding,
Sign(SignError),
Book(BookError),
NotAsleep,
NoBobber,
AlreadyCast,
}Expand description
Why a helper gave up. Nothing was left half-done: buttons are released and a window the helper opened is closed again.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Disconnected
The session ended (or the handle belongs to a session that ended).
Timeout
The helper did not finish within its time limit.
Teleported
The server teleported / set back the player while the helper was running.
Died
The player died while the helper was running.
NotLoaded(BlockPos)
The block’s chunk column is not loaded (never treated as air).
NothingToDig(BlockPos)
There is nothing to dig (air).
Unbreakable(BlockPos)
The block cannot be broken (bedrock, barriers, …).
OutOfReach(BlockPos)
No face of the block can be reached with an unobstructed crosshair (reach 4.5).
LostTarget(BlockPos)
The crosshair left the block while digging (something moved in between).
Occupied(BlockPos)
The block to place into is occupied (not air or a liquid), or the player stands in it.
NoSupport(BlockPos)
The block to place against is air.
WouldActivate(BlockPos)
The block placed against reacts to a right click (chest, door, …): placing would
activate it. Sneak first (set_controls with sneak) or pick another face.
NotPlaced(BlockPos)
The server did not put a block there (it refused the placement).
NothingHeld
Nothing in the hand.
NoSuchItem(String)
No stack matches.
UnknownItem(String)
An item name this version does not know.
UnknownBlock(String)
A block name this version does not know.
NoWindow
The helper needs an open container window.
Click(ClickError)
The inventory refused the click for good (not a retryable refusal).
ClickRejected
The server rejected the click (the inventory resyncs).
ClickTimedOut
No confirm arrived for the click.
CannotUse
The held item cannot be used now (not usable, full food bar, …).
Cancelled
The task was aborted or its session ended before it finished.
Panicked(String)
The task panicked.
NoSuchEntity(i32)
The entity is not tracked (gone, or ghast_client::Interests::ENTITIES is off).
NoPath
No path to the goal.
Stuck
The walker made no progress.
NotRideable(i32)
The entity’s type carries no player (crate::Bot::mount).
EntityOutOfReach(i32)
The entity is farther than the interaction reach (3 blocks from the eyes to its box), or the crosshair could not be put on it.
NotSeated(i32)
The server did not seat the player on the entity after the right clicks (no saddle or harness, not tamed, the seats taken, a protected region).
NotRiding
The helper needs the player to ride something.
Sign(SignError)
The sign editor refused the lines (none open, more than four lines).
Book(BookError)
The book edit was refused (no book and quill in the hand, too many pages, a blank title).
NotAsleep
The player is not asleep (the server did not put it in the bed, or it is awake).
NoBobber
The bot has no fishing bobber out (none was cast, or it went away).
AlreadyCast
A fishing bobber is out already (reel it in first).
Trait Implementations§
Source§impl Error for Error
impl Error for Error
1.30.0 · Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()