Closed Boba194230 closed 1 year ago
Adding "patched:has_patches": true
to the pack.mcmeta
enables patching (i.e. Patched will look for patches in them), but it doesn't do much of anything if there's no patches in them. Patches always have a file name of <name of file being patched with extension>.patch
, and inside them are effectively a series of edits to make to the file being patched.
I'd like to ask about what exactly you're trying to do, since I didn't really understand from your description. Are you trying to make the two data packs compatible with each other? Add (or remove) things from the two? Make them work better with modded things? What's the context here, or rather, what is your end goal? If you could elaborate a bit on that then I could give more useful (and specific) help.
So basically I have terralith which has an overworld.json with its own biomes and then I have cavernous which adds it’s own cave biomes with overworld.json. Currently I have manually combined the files but I’m looking for a better way to do it as it’s not perfect. I’m trying to learn how the patch is set up whether I can just have each mod have their own overworld.json.patch which would just be a copy of the file as is of each mod. I’m wondering if the mod will take care of combining them as is or if I have to set up the specific things that it needs to patch. Trying to see if it’s easier to use this or manually do it.
Just trying to combine the biomes from the two
Alright, so there's two options for creating the patches.
The simpler one is taking each file (along with its vanilla equivalent) and dumping it into this site (or a similar one) to create the patch.
Unfortunately, patch generators like this are effectively playing a guessing game so the created patch isn't going to be as efficient as (or communicate its intent as well as) a hand-made one. For example, this site likes to write out all the changes to an element when a full replace
patch would be more applicable in that scenario.
The more complex one involves taking each file and their vanilla counterpart, and putting those into a difference-viewing application (frequently called "diffing" tools). It'll likely initially look like a complete mess, so you'll need to clean it up by fixing the unrelated differences (like vanilla biomes being in a different order). Then once you've got the real differences, you'll need to write a patch. This document might be helpful for this.
Finally, you'll need to remove the files that have been converted to patches, so they don't keep replacing each other.
(Something to note is that overworld.json
isn't the only conflicting file. In fact, here's a list of all the ones I found: dimension/overworld.json
, worldgen/biome/dripstone_caves.json
, worldgen/biome/lush_caves.json
, and worldgen/noise_settings/overworld.json
.)
Yeah I knew about the other ones I was just mentioning the one for sake of brevity, I’ll give that a try thanks. So if I understand right I shouldn’t have an overworld.json anymore in each pack just an overworld.json.patch and then the mod takes over combining those patches to the vanilla one?
I won’t be able to test it for a bit but I’ll let you know how it goes
So if I understand right I shouldn’t have an overworld.json anymore in each pack just an overworld.json.patch and then the mod takes over combining those patches to the vanilla one?
Yeah. Patched will apply all the overworld.json.patch
files onto overworld.json
. (Except ones which it cannot apply because of errors it encounters, which'll be logged.) If you were to keep the original file, then I believe the patches would only apply to that version of the file, so you'd end up with the file + patch(es) from the datapack listed "highest" taking precedence.
Also, I wanted to mention the commands Patched provides since those tend to come in handy when trying to make sure your patches work correctly. I expect you'll find them at least somewhat useful, especially since trying to test worldgen stuff frequently involves reopening one or more worlds multiple times (Patched will let you view the patched file after /reload
even if Minecraft refuses to reload biome/dimension definitions).
Should I have a patch between vanilla and terralith and then vanilla and cavernous? Because I imagine if I don’t use vanilla as a reference then only would would probably patch, I guess I could leave terralith as a mod and then cavernous as the datapack with a patch to edit the overworld.json that terralith (mod version) probably overwrites
Sorry I didn't correctly read your comment as I was on mobile, I understand now
K I tried It with the first method and the patches show up in game but don't actually seem to do anything as the biomes aren't showing up from either. I think I might just accept what I currently have as functional as this seems to be more work than its worth lol, thx for trying to help though
So I've added the "patched:has_patches": true to the pack.mcmeta of two packs, terralith and cavernous. How do I get them to patch? Do I just need to make a copy of the files that are the same and add .patch onto them or do I actually need to tell it how to patch them ie what to add. I'm hoping to save myself a lot of work here.