/// Adds an entity to a chunk.
Adds an entity to a chunk.
Adds an entity to a chunk .
pub fn add_to_chunk(&mut self, chunk: ChunkPosition, entity: Entity) {
        self.0
            .entry(chunk)
            .and_modify(|(dirty, vec)| {
                dirty.store(true, Ordering::SeqCst);
                vec.push(entity)
            })
            .or_insert_with(|| (AtomicBool::new(true), vec![entity]));
    }
pub fn add_to_chunk ( & mut self , chunk : ChunkPosition , entity : Entity ) { self . 0 . entry ( chunk ) . and_modify ( | ( dirty , vec ) | { dirty . store ( true , Ordering :: SeqCst ) ; vec . push ( entity ) } ) . or_insert_with ( | | ( AtomicBool :: new ( true ) , vec ! [ entity ] ) ) ; }
Adds an entity to a chunk.
Adds an entity to a chunk .
&mut self
chunk
ChunkPosition
entity
Entity