JsonPatcher
ModA tool for patching minecrafts json files, without overrding them, using a custom DSL
Description
JsonPatcher
JsonPatcher is a mod that allows you to modify json files in datapacks and resourcepacks without overriding them. This is primarily useful for mod developers and pack makers, but can also be used by players to modify their own packs.
V2 Disclaimer
JsonPatcher v2 is currently in beta. V2 introduces a bunch of new features including global patches for mods and modpacks. Documentation for v2 is available at jsonpatcher-docs.mattidragon.dev. The documentation is however quite incomplete and partially outdated. For some cases it might be best to consult the old wiki instead.
Usage
You can add jsonpatcher to your mods buildscript like this:
repositories { maven { url 'https://jitpack.io' } } dependencies { modImplementation(include("com.github.mattidragon:jsonpatcher:${jsonpatcher_version}")) }To begin using jsonpatcher, just create a file with the .jsonpatch extension in the data/<namespace>/jsonpatch directory of your datapack or assets/<namespace>/jsonpatch directory of your resourcepack.
You'll want to begin your patch with a @version meta tag like this. This will let jsonpatcher know that your patch will work with this version. In the future you may be able to select a version in more ways.
@version "1"Next you'll want to select the files you want to patch. This is done with the @target meta tag. All meta tags follow a json format. You can either select a single file with a string, use an object for broader selections, or use an array for multiple selections. If any selector in the array matches, the patch will apply.
Now you can begin modifying the target file. The patch files use a c-like syntax. You can access the target files contents with $. It can be used like a variable, or you can put the property you want to access directly after it.
For more info on the language, see the wiki.
Compatibility
Mod Loaders
Game Versions
Recommended Gear
AffiliateHardware and extras that pair well with this mod.
As an Amazon Associate I earn from qualifying purchases.
Similar Mods
Better Shears 3
Adds tiered shears
Can I Join Now?
Updates MOTD to reflect current in-world time to show if it is safe to join
Animal Garden - Snow Leopard
This mod adds the ghost of the mountains, the snow leopard as a tamable animal into the snowy biomes.
Loginar Storage
Storage and inventory improvements... and alien squid dudes
Fel's Machine Guns II
A mod that adds heavy machine guns to Minecraft.
Plus 1 Step Height
This mod adds +1 step height to the player, just like the horses do in Vanilla Minecraft