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 query;
7mod server;
8
9pub use query::{entity_flags, BlockHit, BlockInfo, EntityInfo, Face, PlayerInfo};
10pub use server::Server;
11
12/// A block position in the world.
13#[derive(Debug, Clone, Copy, PartialEq, Eq)]
14pub struct BlockPos {
15 pub x: i32,
16 pub y: i32,
17 pub z: i32,
18}
19
20impl BlockPos {
21 pub const fn new(x: i32, y: i32, z: i32) -> Self {
22 Self { x, y, z }
23 }
24}