Gameonlp / OreDepos

A simple Minecraft mod that adds ore deposits and miners like in Factorio
MIT License
0 stars 0 forks source link

Config ores by biome #19

Open ranma862 opened 8 months ago

ranma862 commented 8 months ago

Hi! I love your mod so so much, I've always wanted to be able to make MC mining more like Factorio/Satisfactory. It gives my server a reason to make cool train lines out to the deposits instead of just strip-mining anywhere and constantly moving on.

I was hoping for a way to specify in config which biomes (or ideally biome tags) that certain ore deposits spawn in? Ex: iron only spawns in biomes tagged "forest", gold only spawns in the desert, etc. I'd love it if my players would have an incentive to plan out where they need to build their next mining outpost - "our uranium supply isn't keeping up, better go explore for mountains". Is this possible at all? I'm on MC version 1.19.2 but anything would be appreciated, thank you!

ranma862 commented 8 months ago

Also, I only know a little about coding, but if I'm on the right track please let me know. I opened up the .jar file with 7zip, and found the \data\oredepos\forge\biome_modifier\ folder with several different JSONs for each ore. If I just edit the biome field in those with the tags I want, is that basically what I'm looking for?

Gameonlp commented 8 months ago

Exactly, that is a forge feature/requirement they added since 1.19 as far as I remember. You can create a data pack to modify all the ore spawns properly. The path (in the data pack) is exactly the one you found, and you should be able to just copy and modify the existing JSON files. Edit: Will still take a look if I can make it more comfortable.

ranma862 commented 8 months ago

Awesome, thank you so much!

ranma862 commented 8 months ago

"biomes": "#namespace:your_biome_tag" // accepts a biome id, [list of biome ids], or #namespace:biome_tag

As far as I can tell, you can't do a list of biome tags, only a list of specific biome ids. The above line is from ForgeBiomeModifiers.AddFeaturesBiomeModifier.

Ex, this doesn't work: "biomes": ["#minecraft:is_forest","#minecraft:is_mountain"]

You probably know all this already, but I've been puzzling this around without really knowing what I'm doing and I needed to write it down somewhere :)