CraftFromContainersFix
Fixes CraftFromContainers 4.0.30 eating wood and ore when you fill a kiln or smelter with the fill-all key or from nearby chests. Client-side only.CraftFromContainersFix
Client-side fix for CraftFromContainers 4.0.30 on Valheim 1.0. Kilns and smelters receive the wood and ore again instead of silently eating it.
The problem
With CraftFromContainers 4.0.30 these actions take the items away and add nothing:
left shift + Eon a charcoal kiln, smelter, blast furnace or any other station that takes ore ("add max");- plain
Eon such a station when you carry no suitable item and the mod pulls it from nearby chests.
The mod removes the items first and then throws a NullReferenceException while building the network message
(Smelter_OnAddOre_Patch.Prefix in Player.log), so the message is never sent and the items are gone.
Adding fuel (coal to a smelter, wood to a fire) is not affected.
What the mod does
It patches that one method of CraftFromContainers in memory: the "cheated" flag of the network message is read from the item that is actually being added, the same way the game does it. Nothing else is changed.
If CraftFromContainers is not installed, or a later version no longer has the bug, the mod does nothing.
Installation
Client-side only. Install it next to CraftFromContainers; the server and other players do not need it.
- Mod manager: install as usual.
- Manual: put
CraftFromContainersFix.dllintoBepInEx/plugins.
How to check
BepInEx/LogOutput.log has the line Fixed 2 RPC_AddOre call(s) in CraftFromContainers on start.
In game: left shift + E on a charcoal kiln fills it, and the wood you lose is the wood that went in.
Кратко по-русски
Клиентская заплатка для CraftFromContainers 4.0.30. Без неё left shift + E («добавить max») на угольной печи и
плавильне, а также добавление руды из соседних сундуков забирает предметы и ничего не загружает: мод падает с ошибкой
до отправки сообщения. Заплатка правит этот метод мода в памяти, остальное не трогает. На сервер ставить не нужно.


