ghast-client 0.5.5

Headless Minecraft Java Edition client for the ghast library: connection, login, fixed 50 ms tick loop and a version-agnostic bot API (1.8.9, 1.12.2, 1.16.5, 26.1, 26.2 and 26.3)
Documentation
//! The engine replays of the 26.3 oracle goldens (`tests/golden/26.3/`): the shared replays
//! (`modern.rs`) with the 26.3 modules.

pub(super) use super::tests::*;
pub(super) use super::*;
pub(super) use crate::common::{EntityAction, JoinGame, Teleport};
pub(super) use crate::phys_golden::v261 as golden;
pub(super) use crate::sim::test_chunks::{v26_3 as chunk, v26_3_sections as chunk_sections};
pub(super) use crate::version::v26_3 as wire_row;
pub(super) use crate::version::v26_3::inv;
pub(super) use crate::version::{V26_3 as Marker, Wire26_3 as Wire};
pub(super) use ghast_data::v26_3 as data;
pub(super) use ghast_protocol::RawPacket;
pub(super) use ghast_protocol::v26_3 as proto;
pub(super) type ModernSim = crate::sim::Sim263;
pub(super) const GAME: GameVersion = GameVersion::V26_3;
pub(super) const INVENTORY: ghast_inventory::Version = ghast_inventory::Version::V26_3;
pub(super) const GOLDEN: &str = "26.3";

/// A component patch with one `enchantments` component (its body).
pub(super) fn enchantments_patch(body: &[u8]) -> ghast_protocol::types::slot::v775::ComponentPatch {
    let id = ghast_inventory::modern::component_id(INVENTORY, "enchantments").unwrap();
    ghast_protocol::types::slot::v775::ComponentPatch::from_parts_777(&[(id, body)], &[])
}

#[allow(clippy::duplicate_mod)]
#[path = "modern.rs"]
mod replays;

#[allow(clippy::duplicate_mod)]
#[path = "modern_dig.rs"]
mod held_dig;

#[allow(clippy::duplicate_mod)]
#[path = "modern_clicks.rs"]
mod entity_clicks;

#[allow(clippy::duplicate_mod)]
#[path = "modern_nonliving.rs"]
mod nonliving;

/// The idle slime and bed drops of the 26.3 lab (6 – 30 blocks, the bounce tail to its end,
/// incl. the 20-block drop's sub-threshold landing that sends only `flying(on_ground)`) through
/// the whole engine: every packet equals the real 26.3 client's.
#[test]
fn restitution_drops_through_the_engine() {
    let mut hand: Vec<String> = (6..=30)
        .step_by(2)
        .map(|h| format!("slime_drop_{h}_long"))
        .collect();
    hand.push("slime_drop_20_drift".into());
    hand.push("bed_drop_20_long".into());
    let hand: Vec<&str> = hand.iter().map(String::as_str).collect();
    let (cases, _) = replays::ext_replay_with("scenarios.jsonl.gz", &hand, false);
    assert_eq!(cases, hand.len());
}