diff --git a/routes-native/src/stateserver/world.rs b/routes-native/src/stateserver/world.rs index 13bd95e..6622201 100644 --- a/routes-native/src/stateserver/world.rs +++ b/routes-native/src/stateserver/world.rs @@ -19,7 +19,7 @@ impl World { for x in 0..self.xsize { for y in 0..self.ysize { for z in 0..self.zsize { - let tile = tiles::Tile::new(tiles::Tiletypes::Dirt, x, y, z); + let tile = tiles::Tile::new(tiles::Tiletypes::Dirt); ret.push(Vector3::new(x as f32, y as f32, z as f32)); self.tiles[x][y][z] = tile; } @@ -39,7 +39,7 @@ impl World { fn get_vec3(xsize: usize, ysize: usize, zsize: usize) -> Vec>> { let mut zvec: Vec = Vec::with_capacity(zsize); - zvec.resize(zsize, tiles::Tile::new(tiles::Tiletypes::Air, 0, 0, 0)); + zvec.resize(zsize, tiles::Tile::new(tiles::Tiletypes::Air)); let mut yvec: Vec> = Vec::with_capacity(ysize); yvec.resize(ysize, zvec.clone()); diff --git a/routes-native/src/stateserver/world/tiles.rs b/routes-native/src/stateserver/world/tiles.rs index 819b02d..c77080b 100644 --- a/routes-native/src/stateserver/world/tiles.rs +++ b/routes-native/src/stateserver/world/tiles.rs @@ -12,14 +12,11 @@ pub enum Tiletypes { #[derive(Debug, Clone, Copy)] pub struct Tile { kind: Tiletypes, - x: usize, - y: usize, - z: usize, } impl Tile { - pub fn new(kind: Tiletypes, x: usize, y: usize, z: usize) -> Tile { - Tile { kind, x, y, z } + pub fn new(kind: Tiletypes) -> Tile { + Tile { kind } } pub fn kind_to_string(&self) -> &str { &self.kind.as_ref()