pub fn queue_chunk_load(&mut self, req: LoadRequest) {
        let pos = req.pos;
        if self.cache.contains(&pos) {
            // Move the chunk from the cache to the map
            self.chunk_map
                .0
                .insert(pos, self.cache.remove(pos).unwrap());
            self.chunk_map.chunk_handle_at(pos).unwrap().set_loaded();
        } else {
            self.loading_chunks.insert(req.pos);
            self.chunk_worker.queue_load(req);
        }
    }
/// Queues the given chunk to be loaded. If the chunk was cached, it is loaded immediately.
Queues the given chunk to be loaded. If the chunk was cached, it is loaded immediately.
Queues the given chunk to be loaded . If the chunk was cached it is loaded immediately .
pub fn queue_chunk_load(&mut self, req: LoadRequest) {
        let pos = req.pos;
        if self.cache.contains(&pos) {
            // Move the chunk from the cache to the map
            self.chunk_map
                .0
                .insert(pos, self.cache.remove(pos).unwrap());
            self.chunk_map.chunk_handle_at(pos).unwrap().set_loaded();
        } else {
            self.loading_chunks.insert(req.pos);
            self.chunk_worker.queue_load(req);
        }
    }
pub fn queue_chunk_load ( & mut self , req : LoadRequest ) { let pos = req . pos ; if self . cache . contains ( & pos ) { // Move the chunk from the cache to the map self . chunk_map . 0 . insert ( pos , self . cache . remove ( pos ) . unwrap ( ) ) ; self . chunk_map . chunk_handle_at ( pos ) . unwrap ( ) . set_loaded ( ) ; } else { self . loading_chunks . insert ( req . pos ) ; self . chunk_worker . queue_load ( req ) ; } }
Queues the given chunk to be loaded.
Queues the given chunk to be loaded .
&mut self
req
LoadRequest
&mut self
req
LoadRequest