#![forbid(unsafe_code)]
#![warn(missing_docs, unnameable_types)]
#![cfg_attr(
not(any(feature = "v1_8", feature = "v1_12_2", feature = "v1_16_5")),
allow(
dead_code,
unused_imports,
unused_variables,
unused_mut,
unreachable_code
)
)]
mod class;
mod control;
mod cost;
#[cfg(feature = "client")]
mod follower;
mod goal;
mod jump;
mod moves;
mod physics;
mod plan;
mod sim;
mod world;
pub use control::{Command, Controller, ControllerConfig, Progress};
pub use cost::Costs;
#[cfg(feature = "client")]
pub use follower::{FollowConfig, FollowError, FollowStatus, Follower};
pub use goal::Goal;
pub use moves::{MoveKind, NodeKind};
pub use physics::Observation;
pub use plan::{Budget, Config, DigCost, Path, Pathfinder, Place, PlanError, Search, Step};
pub use sim::{SimOutcome, SimReport, Simulation, simulate};
pub use world::BlockSource;
#[derive(Clone, Copy, Debug, PartialEq, Eq, Hash)]
#[non_exhaustive]
pub enum Version {
#[cfg(feature = "v1_8")]
V1_8,
#[cfg(feature = "v1_12_2")]
V1_12,
#[cfg(feature = "v1_16_5")]
V1_16_5,
}
impl Version {
#[cfg(feature = "client")]
#[must_use]
pub fn from_game(v: ghast_client::GameVersion) -> Option<Version> {
match v {
#[cfg(feature = "v1_8")]
ghast_client::GameVersion::V1_8_9 => Some(Version::V1_8),
#[cfg(feature = "v1_12_2")]
ghast_client::GameVersion::V1_12_2 => Some(Version::V1_12),
#[cfg(feature = "v1_16_5")]
ghast_client::GameVersion::V1_16_5 => Some(Version::V1_16_5),
_ => None,
}
}
}