Let's say I want to make it so that when a bed is destroyed, the corresponding soil drops. In the farmland.json file, the ‘drop’ section is empty. Okay, let's look at the corresponding section in soil.json and get it from there. Result:
FarmlandToSoil.zip/\assets\game\patches\farmland.json
[
{
"file": "game:blocktypes/soil/farmland.json",
"op": "replace",
"path": "drops",
"value": [ {
type: "block",
code: "soil-{fertility}-none",
quantity: { avg: 1, var: 0 }
} ]
}
And nothing works. What's more, an error appears when loading the game:
8.8.2025 11:27:32 [Error] Patch 0 (target: game:blocktypes/soil/farmland.json) in game:patches/farmland.json failed, following Exception was thrown:
8.8.2025 11:27:32 [Error] Exception: The parent is missing.
at JsonPatch.Adaptors.BaseTargetAdapter.ApplyOperation(Operation operation)
at Tavis.PatchDocument.ApplyTo(IPatchTarget target)
at Vintagestory.ServerMods.NoObf.ModJsonPatchLoader.ApplyPatch(Int32 patchIndex, AssetLocation patchSourcefile, JsonPatch jsonPatch, Int32& applied, Int32& notFound, Int32& errorCount) in VSEssentials\Loading\JsonPatchLoader.cs:line 354