Add World struct

We also check now if world exits
This commit is contained in:
Alexander Medvedev committed 2024-08-19 21:14:48 +01:00
1 parent de7b3aa2ea
commit 222b40c8bd
6 files changed
+46 -17

No files matched your search

+14 -1
View File
@@ -1,3 +1,5 @@
use level::Level;
pub mod chunk;
pub mod dimension;
pub const WORLD_HEIGHT: usize = 384;
@@ -6,6 +8,17 @@ pub const DIRECT_PALETTE_BITS: u32 = 15;
pub mod block;
mod global_registry;
pub mod item;
mod level;
pub mod radial_chunk_iterator;
pub mod vector3;
mod world;
pub struct World {
pub level: Level,
// entities, players...
}
impl World {
pub fn load(level: Level) -> Self {
Self { level }
}
}