#[non_exhaustive]pub struct Config {
pub metadata: bool,
pub equipment: bool,
pub effects: bool,
pub player_list: bool,
pub events: bool,
pub skins: bool,
pub player_names: bool,
}Expand description
What the tracker keeps. Everything off costs nothing beyond position tracking; packets for a disabled part are not parsed (and the client should not even decode them, see the version modules’ packet id lists).
#[non_exhaustive]: build it from Config::default with the with_* methods:
let c = ghast_entity::Config::default().with_equipment(false).with_skins(true);
assert!(c.metadata && !c.equipment && c.skins);Fields (Non-exhaustive)§
This struct is marked as non-exhaustive
Struct { .. } syntax; cannot be matched against without a wildcard ..; and struct update syntax will not work.metadata: boolEntity metadata (flags, health, item of item entities, names, …). Default true.
equipment: boolEquipment. Default true.
effects: boolStatus effects. Default true.
player_list: boolTab list (player_info). Default true.
events: boolQueue Events for Entities::drain_events. Default false.
skins: boolKeep the base64 "textures" profile property (skin / cape URLs) of tab-list entries in
PlayerInfo::textures. Default false: properties are skipped without allocating.
player_names: boolWith Config::player_list off: still read the tab list, but keep only each entry’s
profile name and game mode (inline, about 50 bytes per entry; no PlayerInfo). That is
what vanilla needs from it for entities: Entities::player_name (team rules use the
scoreboard name), spectators (not pickable, not pushed, never on the ground) and, on
26.x, refusing a player spawn whose profile is not in the tab list. Ignored when
Config::player_list is on (the full list answers the same questions). Default false.
Implementations§
Source§impl Config
impl Config
Sourcepub const fn with_metadata(self, on: bool) -> Self
pub const fn with_metadata(self, on: bool) -> Self
Sets Config::metadata.
Sourcepub const fn with_equipment(self, on: bool) -> Self
pub const fn with_equipment(self, on: bool) -> Self
Sets Config::equipment.
Sourcepub const fn with_effects(self, on: bool) -> Self
pub const fn with_effects(self, on: bool) -> Self
Sets Config::effects.
Sourcepub const fn with_player_list(self, on: bool) -> Self
pub const fn with_player_list(self, on: bool) -> Self
Sets Config::player_list.
Sourcepub const fn with_events(self, on: bool) -> Self
pub const fn with_events(self, on: bool) -> Self
Sets Config::events.
Sourcepub const fn with_skins(self, on: bool) -> Self
pub const fn with_skins(self, on: bool) -> Self
Sets Config::skins.
Sourcepub const fn with_player_names(self, on: bool) -> Self
pub const fn with_player_names(self, on: bool) -> Self
Sets Config::player_names.
Sourcepub const fn reads_tab_list(&self) -> bool
pub const fn reads_tab_list(&self) -> bool
true when the tracker reads the tab list (full or names only): its packets
(PLAYER_LIST_IDS of the version module) must reach the tracker.