Skip to main content

yog_core/
lib.rs

1//! Core Yog types and handles shared across all API modules.
2//!
3//! Kept tiny and dependency-free: every other `yog-*` crate builds on this, and
4//! the facade [`yog-api`] re-exports it.
5
6mod null_server;
7mod query;
8mod server;
9
10pub use null_server::NullServer;
11pub use query::{BlockHit, BlockInfo, EntityInfo, Face, PlayerInfo, entity_flags};
12pub use server::Server;
13
14/// A block position in the world.
15#[derive(Debug, Clone, Copy, PartialEq, Eq)]
16pub struct BlockPos {
17    pub x: i32,
18    pub y: i32,
19    pub z: i32,
20}
21
22impl BlockPos {
23    pub const fn new(x: i32, y: i32, z: i32) -> Self {
24        Self { x, y, z }
25    }
26}