Skip to content
This repository was archived by the owner on Apr 19, 2025. It is now read-only.

Commit 8c8d057

Browse files
fix(server/crafting): update weight and sync slot when splitting stack (#1802)
Co-authored-by: Linden <[email protected]>
1 parent 43d735f commit 8c8d057

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

modules/crafting/server.lua

+8
Original file line numberDiff line numberDiff line change
@@ -213,6 +213,14 @@ lib.callback.register('ox_inventory:craftItem', function(source, id, index, reci
213213
end
214214

215215
invSlot.count -= 1
216+
invSlot.weight = Inventory.SlotWeight(item, invSlot)
217+
218+
left:syncSlotsWithClients({
219+
{
220+
item = invSlot,
221+
inventory = left.id
222+
}
223+
}, true)
216224
else
217225
Items.UpdateDurability(left, invSlot, item, durability < 0 and 0 or durability)
218226
end

0 commit comments

Comments
 (0)