Mods / ItemSyncFixes

Tags:
QoL
Author:
Garward
Side:
Both
Created:
May 30th at 6:09 AM
Last modified:
Jul 1st at 3:59 PM
Downloads:
921
Recommended download (for Vintage Story 1.22.3):
ItemSyncFixes-v1.0.8.zip  1-click install

Item Sync Fixes is my attempt to fix 3 specific Vintage Story inventory desync symptoms. It is intentionally narrow: it does not try to rewrite inventory networking or make the client authoritative.

The three targeted symptoms are:


1. Crafting output ghost items from partial output moves
2. Rapid clicking or dragging through crafting grid and cursor interactions can make items feel like they move late, flicker backward, or briefly show stale intermediate states.
3. Moving stacks in hotbar/backpack slots can receive exact delayed server self confirmations after the client has already predicted the same final state, causing visible snapback/flicker.

Mod Version Mod IdentifierFor Game version Downloads Released Changelog Download 1-click mod install*
1.0.8 itemsyncfixes 190 Jul 1st at 3:59 PM ItemSyncFixes-v1.0.8.zip 1-click install

Reduced unnecessary crafting output syncs when recipe searches leave an empty output unchanged.

1.0.7 itemsyncfixes 398 Jun 9th at 12:49 AM ItemSyncFixes-v1.0.7.zip 1-click install
  • Split up click drag placement to several frames to avoid UI freezing
1.0.6 itemsyncfixes 83 Jun 7th at 6:55 AM ItemSyncFixes-v1.0.6.zip 1-click install

temporary crash fix for toolsmith broken recipe from vanilla EndCraft()

1.0.5 itemsyncfixes 110 Jun 5th at 9:53 PM ItemSyncFixes-v1.0.5.zip 1-click install
  • Patched clientside click and drag to preview first before mutating items to give the server a chance to keep up
1.0.4 itemsyncfixes 87 May 31st at 5:03 AM ItemSyncFixes-v1.0.4.zip 1-click install

balanced between potential item ghosting and responsiveness this was about the best I could get it the tradeoff is if you place items in the same stack very quickly the client can briefly create duplicate clientside items which goes away after spam clicking on slower servers

1.0.3 itemsyncfixes 6 May 31st at 3:44 AM ItemSyncFixes-v1.0.3.zip 1-click install

Improved external-inventory handling so the anti snapback protection no longer rate limits rapid clicks while still preserving pending slot changes through block entity
 syncs.

1.0.2 itemsyncfixes 4 May 31st at 3:21 AM ItemSyncFixes-v1.0.2.zip 1-click install

 - Fixed a major source of inventory desync when interacting with external inventories.
 - Added protection against block/entity inventory tree syncs rolling back recent client-side slot changes before the server confirmation arrives.
 - Improved right click stack placement behavior in containers, machines, querns, and other storage UIs.

1.0.1 itemsyncfixes 37 May 30th at 6:32 AM ItemSyncFixes-v1.0.1.zip 1-click install

folded my other attempted fix for the ghost item crafting when using shiftclick or number key crafting sometimes making broken items

1.0.0 itemsyncfixes 6 May 30th at 6:10 AM ItemSyncFixes-v1.0.0.zip 1-click install

initial release


14 Comments (oldest first | newest first) (threaded | flat)

EthelVril, 1 day ago

Does this work with optitime?

midzuyo, Jul 6th at 9:47 AM (modified Jul 6th at 9:48 AM)

whats about boat chests desync in multiplayer?

BamsyTheSergal, Jun 9th at 2:34 PM

now just putting a knife at all in the crafting grid will cause a similar disconnect

Crash Report
9.6.2026 09:28:53 [Server Notification] Client 11 disconnected: An action you (or your client) did caused an unhandled exception
9.6.2026 09:28:53 [Server Debug] Despawn player entity Wandour.
9.6.2026 09:28:53 [Server Event] Player Wandour got removed. Reason: Threw an exception at the server
9.6.2026 09:28:53 [Server Error] Exception: Missing or errored output result for recipe 'deconstruct with knife: raw hide mantle'
at Vintagestory.API.Common.RecipeBase.GenerateOutputStack(ItemSlot[] inputSlots, ItemSlot outputSlot) in VintagestoryApi\Common\Crafting\RecipeBase.cs:line 292
at Vintagestory.Common.InventoryCraftingGrid.FindMatchingRecipe_Patch1(InventoryCraftingGrid this)
at Vintagestory.Common.InventoryCraftingGrid.OnItemSlotModified(ItemSlot slot) in VintagestoryLib\Common\GameContent\Inventory\InventoryCraftingGrid.cs:line 142
at Vintagestory.API.Common.InventoryBase.DidModifyItemSlot(ItemSlot slot, ItemStack extractedStack) in VintagestoryApi\Common\Inventory\InventoryBase.cs:line 492
at Vintagestory.Common.InventoryCraftingGrid.DidModifyItemSlot(ItemSlot slot, ItemStack extractedStack) in VintagestoryLib\Common\GameContent\Inventory\InventoryCraftingGrid.cs:line 147
at Vintagestory.API.Common.ItemSlot.OnItemSlotModified(ItemStack sinkStack) in VintagestoryApi\Common\Inventory\ItemSlot.cs:line 459
at Vintagestory.API.Common.ItemSlot.ActivateSlot_Patch1(ItemSlot this, ItemSlot sourceSlot, ItemStackMoveOperation& op)
at Vintagestory.API.Common.InventoryBase.ActivateSlot(Int32 slotId, ItemSlot sourceSlot, ItemStackMoveOperation& op) in VintagestoryApi\Common\Inventory\InventoryBase.cs:line 444
at Vintagestory.Common.InventoryCraftingGrid.ActivateSlot_Patch1(InventoryCraftingGrid this, Int32 slotId, ItemSlot sourceSlot, ItemStackMoveOperation& op)
at Vintagestory.Common.InventoryNetworkUtil.handleActivateInventorySlotPacket(IPlayer byPlayer, Packet_Client packet, IWorldPlayerData plrData) in VintagestoryLib\Common\GameContent\Inventory\InventoryNetworkUtil.cs:line 258
at Vintagestory.Common.InventoryNetworkUtil.HandleClientPacket_Patch1(InventoryNetworkUtil this, IPlayer byPlayer, Int32 packetId, Packet_Client packet)
at Vintagestory.Server.ServerSystemInventory.HandleActivateInventorySlot(Packet_Client packet, ConnectedClient client) in VintagestoryLib\Server\Systems\Inventory.cs:line 603
at Vintagestory.Server.ServerMain.HandleClientPacket_mainthread(ReceivedClientPacket cpk) in VintagestoryLib\Server\ServerMainNetworking.cs:line 275
at Vintagestory.Server.ServerMain.ProcessMain() in VintagestoryLib\Server\ServerMain.cs:line 964
9.6.2026 09:28:53 [Server Event] Client 11 disconnected.
SussyBaka443, May 31st at 12:27 PM

Oh hell yea
This will be a huge help for the items I placed in the chest, but ultimately I still have them in my inventory, making it harder for me to produce iron for example :v

Comet221, May 31st at 8:16 AM

We've been using it for a heavily modded playthrough and for now it works great.

Installing the mod eliminated 90% of problems with desync with crafting, and from that point we didn't have to restart the server even once while we had constant desyncs before.

 

One problem I can see is lagging (pretty heavy lagging sometimes) while crafting some (not all mind you, only some) items, but I assume that this slowdown is what protects the player from desync and that's okay for me.

Ovearall looks like a great mod if you have problems with crafting and inventory breaking.

Garward , May 31st at 8:28 AM
@Comet221: We've been using it for a heavily modded playthrough and for now it works great. Installing the mod eliminated 90% of problems with desync with crafting, and from that point we didn't have to restart the server even once while we had constant desyncs befo

glad to hear I was testing a few vanilla bottlenecks seems like theres a few different tradeoffs with different methods. Some things that help the client aren't very good on a weaker server etc but seems okay balance atm. 

Comet221, May 31st at 9:56 AM
@Garward: glad to hear I was testing a few vanilla bottlenecks seems like theres a few different tradeoffs with different methods. Some things that help the client aren't very good on a weaker server etc but seems okay balance atm.

Could you give me a simple rundown what you did?

I'm really interested how you managed to do it and don't really have experience with how VS runs under the hood.

Garward , May 31st at 11:49 PM
@Comet221: Could you give me a simple rundown what you did? I'm really interested how you managed to do it and don't really have experience with how VS runs under the hood.

harmony patches of the following vanilla classes atm for the crafting part of this

InventoryCraftingGrid.ActivateSlot()
ItemSlotCraftingOutput.TryPutInto()
ItemSlotCraftingOutput.FlipWith()
InventoryCraftingGrid.FindMatchingRecipe()

These change crafting output moves from “let vanilla partially move output and hope the client/server converge” into “only move a complete recipe output, otherwise mark dirty and resync.”

CKitt, Jun 9th at 1:24 PM
@Garward: you know a few examples of these laggy craftings? im trying to find why its doing that

Ladders are a great example. Sticks in the center, full stack of planks dragged out to the six required slots in the grid, will cause lag for me every single time.

Comet221, Jun 11th at 11:41 AM (modified Jun 11th at 11:51 AM)
@Garward: you know a few examples of these laggy craftings? im trying to find why its doing that

Will make some notes next time we play and report back. Lags did become less severe with later versions of the mod though, not sure if due to something that you modified or it's just a coincidence.

 

The thing I was talking about is not the problem reply above mentions. I have slight lag wgile dragging as well but I don't really see it as a problem as I assume it is needed for server to not freak out and desync.

Lag I mentioned before occurs when clicking output item (action of crafting, not putting objects in the grid), the lag is more noticable (sometimes a full second) and it compounds with multiple clicks. W

hen my fiancee who has 0 patience for anything wanted to craft multiple items she managed to lag the game for like 20 seconds and we thought it crashed.

 

Good news is that we still didn't have to restart the server even once due to desync :)

Garward , Jun 12th at 12:30 AM
@Comet221: Will make some notes next time we play and report back. Lags did become less severe with later versions of the mod though, not sure if due to something that you modified or it's just a coincidence. The thing I was talking about is not the problem reply ab

are you using my other mod better handbook too? bc I just fixed a major lag spike it was causing in certain crafting also got a mod that makes grid crafting bit more optimized too

Comet221, Jun 12th at 4:14 AM
@Garward: are you using my other mod better handbook too? bc I just fixed a major lag spike it was causing in certain crafting also got a mod that makes grid crafting bit more optimized too

I actually do, did't even realize it was also yours. Great mod as well, we had no time to play lately so I'll check whenever we have a chance.