Mods / BlockPatch Patcher

Category:
Author: jayu
Side: Server
Created: 5 days ago
Last modified: 5 days ago
Downloads: 19
Follow Unfollow 0

Latest file for v1.19.8:
BlockPatchPatcher.dll 1-click install


Buy Me a Coffee at ko-fi.com

This mod is a library and adds no content to the game

This is a small library to allow to patch blockpatches. With this installed, a content mod can add a file of blockpatch patches at config/blockpatchpatches.json. Patches target all blockpatches, either in worldgen/blockpatches.json or in the worldgen/blockpatches folder.

The allowed format resembles very closely the blockpatch one, as seen in the example patch:

{
"comment": "Patch berries",
"code": "@.*(berry).*",
"op": "replace",
"minTemp": -100,
"maxTemp": 100,
"minRain": 0.0,
"maxRain": 1.0,
"minFertility": 0.0,
"maxFertility": 1.0,
"chance": 2000.0,
"minForest": 0.0,
"maxForest": 1.0,
"minY": 0.0,
"maxY": 1.0,
"quantity": { "dist": "invexp", "avg": 80.0, "var": 30.0 }
}

All numerical values of a block patch can be patched using one of three operation types: "add", "multiply", "replace". The first two will use the existing value dynamically, multiplying it or adding the value in the patch to it. Replace will instead simply replace the value.

Currently supported value types are:

  • Numerical values (int, float)
  • NatFloat (as an example, see "quantity" in the patch above)
  • Strings and lists of strings

Only numerical values support multiplication, string support addition and replacement, while the rest only support replacement. You can make multiple patches targeting the same code to get around this.

Version For Game version Downloads Release date Changelog Download 1-click mod install*
v1.0.0 19 5 days ago Show BlockPatchPatcher.dll Install now

0 Comments (oldest first | newest first)

(edit comment delete)