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.
About this mod Author’s original text
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 + E on a charcoal kiln, smelter, blast furnace or any other station that takes ore ("add max");
- plain E on 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.dll into BepInEx/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») на угольной печи и
плавильне, а также добавление руды из соседних сундуков забирает предметы и ничего не загружает: мод падает с ошибкой
до отправки сообщения. Заплатка правит этот метод мода в памяти, остальное не трогает. На сервер ставить не нужно.
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file. In multiplayer, the host and every client need the same mods installed.
Install these first, or the mod will not work: