CHUNK LOADING KINDA WORKS
This commit is contained in:
1 parent
b4abc6b297
commit
a991ce214b
19 files changed
+273205
-264
No files matched your search
@@ -0,0 +1,21 @@
|
||||
use std::path::PathBuf;
|
||||
|
||||
use crate::world::Level;
|
||||
|
||||
#[derive(Clone, Copy, PartialEq, Eq, Hash)]
|
||||
pub enum Dimension {
|
||||
OverWorld,
|
||||
Nether,
|
||||
End,
|
||||
}
|
||||
|
||||
impl Dimension {
|
||||
pub fn into_level(&self, mut base_directory: PathBuf) -> Level {
|
||||
match self {
|
||||
Dimension::OverWorld => {}
|
||||
Dimension::Nether => base_directory.push("DIM-1"),
|
||||
Dimension::End => base_directory.push("DIM1"),
|
||||
}
|
||||
Level::from_root_folder(base_directory)
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user