use bevy::ecs::query::QueryEntityError;
use bevy::prelude::*;
use thiserror::Error;
#[derive(Debug, Error)]
pub enum VoxelQueryError {
#[error("Cannot find world with id {0:?}")]
WorldNotFound(Entity),
#[error("Cannot find chunk at {1} within the world {0:?}")]
ChunkNotFound(Entity, IVec3),
#[error("There is already a chunk located at {1} within the world {0:?}")]
ChunkAlreadyExists(Entity, IVec3),
#[error("Failed to query chunks")]
QueryError(#[from] QueryEntityError),
}