Skip to content

Commit

Permalink
fix incrementing the wrong thing
Browse files Browse the repository at this point in the history
  • Loading branch information
dyc3 committed Jan 20, 2023
1 parent 55d967b commit ba08bf1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions crates/valence_new/src/inventory.rs
Original file line number Diff line number Diff line change
Expand Up @@ -477,7 +477,7 @@ pub(crate) fn handle_click_container(
if client.inventory_state_id.0 != event.state_id {
// client is out of sync, resync, ignore click
debug!("Client state id mismatch, resyncing");
client.inventory_state_id.0 += 1;
client.inventory_state_id += 1;
let packet = SetContainerContentEncode {
window_id: client.window_id,
state_id: VarInt(client.inventory_state_id.0),
Expand Down Expand Up @@ -508,7 +508,7 @@ pub(crate) fn handle_click_container(
if client.inventory_state_id.0 != event.state_id {
// client is out of sync, resync, and ignore the click
debug!("Client state id mismatch, resyncing");
client.inventory_state_id.0 += 1;
client.inventory_state_id += 1;
let packet = SetContainerContentEncode {
window_id: client.window_id,
state_id: VarInt(client.inventory_state_id.0),
Expand Down

0 comments on commit ba08bf1

Please sign in to comment.