From 12390d30088acb38a5a21761738117bbf9940e95 Mon Sep 17 00:00:00 2001 From: Serkyo Date: Tue, 7 Jul 2026 22:47:07 +0200 Subject: [PATCH] refactor(server): drop unused synchronous get_chunk path --- crates/server/src/world_server.rs | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/crates/server/src/world_server.rs b/crates/server/src/world_server.rs index b6eac45..57946bf 100644 --- a/crates/server/src/world_server.rs +++ b/crates/server/src/world_server.rs @@ -30,8 +30,6 @@ pub struct StreamStats { /// The server's authoritative representation of the world. #[derive(Resource)] pub struct ServerWorld { - /// Deterministic voxel source used to generate missing chunks on demand. - generator: Arc, /// Currently resident chunks, keyed by chunk-space position. chunks: HashMap, /// Sending end of the job channel; the main thread pushes positions that require generation. @@ -82,7 +80,6 @@ impl ServerWorld { drop(result_tx); Self { - generator, chunks: HashMap::new(), job_tx, result_rx, @@ -91,13 +88,6 @@ impl ServerWorld { } } - /// Retrieves a reference to the chunk at the given position, generating it if necessary. - pub fn get_chunk(&mut self, pos: ChunkPos) -> &Chunk { - self.chunks - .entry(pos) - .or_insert_with(|| self.generator.generate_chunk(pos)) - } - /// Number of chunks currently resident in memory. #[must_use] pub fn loaded_count(&self) -> usize {