use crate::world::block_entity::BlockEntity;
use crate::world::collision::{Aabb, RayHit};
pub trait WorldHandle {
fn get_block(&self, x: i32, y: i32, z: i32) -> u16;
fn set_block(&self, x: i32, y: i32, z: i32, state: u16);
fn get_block_entity(&self, x: i32, y: i32, z: i32) -> Option<BlockEntity>;
fn set_block_entity(&self, x: i32, y: i32, z: i32, entity: BlockEntity);
fn mark_chunk_dirty(&self, cx: i32, cz: i32);
fn persist_chunk(&self, cx: i32, cz: i32);
fn dirty_chunks(&self) -> Vec<(i32, i32)>;
fn check_overlap(&self, aabb: &Aabb) -> bool;
fn ray_cast(
&self,
origin: (f64, f64, f64),
direction: (f64, f64, f64),
max_distance: f64,
) -> Option<RayHit>;
fn resolve_movement(&self, aabb: &Aabb, dx: f64, dy: f64, dz: f64) -> (f64, f64, f64);
}