Skip to content

Commit

Permalink
remove some unnecessary checks
Browse files Browse the repository at this point in the history
  • Loading branch information
dyc3 committed Jan 21, 2023
1 parent 70f8b3a commit 8bb95dd
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions crates/valence_new/src/inventory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -333,10 +333,6 @@ pub(crate) fn update_open_inventories(
mut clients: Query<(Entity, &mut Client, &mut OpenInventory)>,
mut inventories: Query<&mut Inventory>,
) {
if clients.is_empty() {
return;
}

// These operations need to happen in this order.

// send the inventory contents to all clients that are viewing an inventory
Expand Down Expand Up @@ -369,9 +365,6 @@ pub(crate) fn update_open_inventories(
client.write_packet(&packet);
} else {
// the client is already viewing the inventory
if inventory.modified == 0 {
continue;
}
if inventory.modified == u64::MAX {
// send the entire inventory
client.inventory_state_id += 1;
Expand Down

0 comments on commit 8bb95dd

Please sign in to comment.