#[non_exhaustive]pub enum Event {
Show 13 variants
Spawned(i32),
Removed {
id: i32,
ty: EntityType,
},
Moved(i32),
Velocity(i32),
Status {
id: i32,
status: i8,
},
Metadata(i32),
Hurt {
id: i32,
attacker: Option<i32>,
},
Equipment(i32),
Effects(i32),
Mounted {
id: i32,
vehicle: Option<i32>,
},
Collected {
collected: i32,
collector: i32,
},
PlayerList,
Swing {
id: i32,
off_hand: bool,
},
}Expand description
A change notification (only queued with Config::events).
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Spawned(i32)
A new entity (or a replacement for an existing id).
Removed
An entity was removed (destroy, pickup, world change).
Moved(i32)
Server position or rotation changed (movement, teleport).
Velocity(i32)
Velocity changed.
Status
entity_status (e.g. 2 hurt, 3 death).
Metadata(i32)
Metadata changed.
Hurt
An entity was hurt: 1.8 – 1.16.5 the hurt statuses (2; 1.12+ also 33 thorns, 36
drowning, 37 burning; 1.16 44 sweet berry bush, each also queued as Event::Status),
26.x a living entity’s damage_event. The bot’s own entity included.
Fields
Equipment(i32)
Equipment changed.
Effects(i32)
Effects changed.
Mounted
Riding changed: id now rides vehicle.
Collected
An item / orb / arrow was picked up (collector may be the bot).
PlayerList
The tab list changed.
Swing
A tracked entity swung its arm (animation / animate: 1.8 action 0; 1.9+ action 0
the main hand, 3 the off hand) — the server’s echo of an attack, a dig or a use.