handle inventory desyncs #58

Open
opened 2026-03-19 17:40:24 +01:00 by thetxt · 3 comments
Owner

at the moment inventories can desync between client and server, because state_id field in inventory related packets is not utilized.
also the changed_slots and carried_items in the ClickContainer packet are not used either

collection of todos:

  • somehow I managed to get to a point where a plank was dropped everytime I closed a chest with two players looking into it (happened after crafting in crafting table)
  • crafting output in inventory doesnt get shown
  • crafting output of crafting table allows crafting more items from non existant inputs
  • resend inventory on state_id mismatch
  • make use of Array of changed slots in the ClickContainer packet to detect desycns
    • do some more testing, as the resending gets triggered quite a lot
  • shift clicking crafting output not working (tested in crafting table)
at the moment inventories can desync between client and server, because state_id field in inventory related packets is not utilized. also the changed_slots and carried_items in the ClickContainer packet are not used either collection of todos: - [x] somehow I managed to get to a point where a plank was dropped everytime I closed a chest with two players looking into it (happened after crafting in crafting table) - [x] crafting output in inventory doesnt get shown - [x] crafting output of crafting table allows crafting more items from non existant inputs - [x] resend inventory on state_id mismatch - [x] make use of Array of changed slots in the ClickContainer packet to detect desycns - [ ] do some more testing, as the resending gets triggered quite a lot - [ ] shift clicking crafting output not working (tested in crafting table)
thetxt added this to the 0.10.0 milestone 2026-09-22 18:44:56 +02:00
Author
Owner

first steps in fd67b74f9e
still need to check if the state id matches, but first there are a few bugs I need to fix (not sure if theyre new -> theyre not):

  • somehow I managed to get to a point where a plank was dropped everytime I closed a chest with two players looking into it (happened after crafting in crafting table)
  • crafting output in inventory doesnt get shown
  • crafting output of crafting table allows crafting more items from non existant inputs
first steps in fd67b74f9e still need to check if the state id matches, but first there are a few bugs I need to fix (not sure if theyre new -> theyre not): - [x] somehow I managed to get to a point where a plank was dropped everytime I closed a chest with two players looking into it (happened after crafting in crafting table) - [x] crafting output in inventory doesnt get shown - [x] crafting output of crafting table allows crafting more items from non existant inputs
Author
Owner

fixed quite a few bugs, especially around crafting and the resulting inventory state between 533a4e5cbb and 213755fcac
Now all thats left is to detect state_id mismatches

fixed quite a few bugs, especially around crafting and the resulting inventory state between 533a4e5cbbfec78cd7a25b3cdd931cfef9358b14 and 213755fcac35d74752e1c3932b4c31433cc448f3 Now all thats left is to detect state_id mismatches
Author
Owner

Also make use of Array of changed slots in the ClickContainer packet to detect desycns

Also make use of Array of changed slots in the ClickContainer packet to detect desycns
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
thetxt/oxide#58
No description provided.