#[non_exhaustive]pub enum Event {
Show 19 variants
Chat(ChatMessage),
Teleport(TeleportEvent),
Joined,
Respawned,
Died,
Health(Health),
GameMode(GameMode),
WindowOpened(i32),
WindowClosed,
InventoryChanged,
Click(ClickResult),
BlockUpdate {
pos: BlockPos,
raw: u32,
},
EntitySpawned(EntityInfo),
EntityGone(i32),
Hud(HudEvent),
TabComplete(TabCompletion),
Sign(SignEvent),
Sleep(SleepEvent),
Fishing(FishingEvent),
}Expand description
Something that happened, as delivered to Bot::events subscribers (in the order the
tick saw them).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Chat(ChatMessage)
A chat message (ghast_client::Interests::CHAT, on by default in crate::Ext).
Teleport(TeleportEvent)
The server teleported / set back the player.
Joined
A join game packet (first join or a proxy server switch).
Respawned
Respawned or changed dimension.
Died
The player died.
Health(Health)
Health, food or saturation changed (the new values).
GameMode(GameMode)
The game mode changed.
WindowOpened(i32)
A container window opened (its id).
WindowClosed
The open window closed.
InventoryChanged
The player inventory changed.
Click(ClickResult)
A click’s confirm (or timeout).
BlockUpdate
A block changed (ghast_client::Interests::BLOCK_UPDATES): the version’s raw state.
EntitySpawned(EntityInfo)
An entity appeared (ghast_client::Interests::ENTITIES; entities that existed when
the subscription started are not reported).
EntityGone(i32)
An entity is gone (despawned, out of range, killed).
Hud(HudEvent)
The HUD changed (ghast_client::Interests::HUD): boss bars, titles, the action bar,
the tab list’s header and footer.
TabComplete(TabCompletion)
The server answered a tab-completion request (Bot::tab_complete).
Sign(SignEvent)
The sign editor opened, closed by itself or was ignored (ghast_client::sign).
Sleep(SleepEvent)
The player fell asleep or woke up (Bot::sleep_in, Bot::leave_bed).
Fishing(FishingEvent)
Our fishing bobber was cast, bit, got hooked or went away (ghast_client::fishing;
needs entity tracking).