Skip to content
This repository has been archived by the owner on Jul 1, 2024. It is now read-only.

Commit

Permalink
Remove todo
Browse files Browse the repository at this point in the history
  • Loading branch information
Mubelotix committed Nov 16, 2023
1 parent d23b5e9 commit 2eae281
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion minecraft-server/src/entities/player.rs
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ impl Handler<Player> {
velocity_z: (velocity.z * 8000.0) as i16,
}).await;
},
WorldChange::EntityDispawned { eid } => todo!(),
WorldChange::EntityDispawned { eid } => {
self.mutate(|player| {player.entity_prev_positions.remove(&eid); ((), EntityChanges::other())}).await;
self.send_packet(PlayClientbound::RemoveEntities { entity_ids: Array::from(vec![VarInt(eid as i32)]) }).await;
},
WorldChange::EntityMetadata { eid, metadata } => todo!(),
WorldChange::EntityPosition { eid, position } => {
let Some(prev_position) = self.mutate(|player| ((player.entity_prev_positions.insert(eid, position.clone())), EntityChanges::other())).await else {return};
Expand Down

0 comments on commit 2eae281

Please sign in to comment.