
Let's talk: Config format
Pannoniae opened this issue · 6 comments
To clean up the Google Docs a bit, I'm moving the config format here. (courtesy of @Jacky2611)
I'll quote him:
I am currently writing a worldgen mod and one of the most annoying things I have run into so far is that all oregen are hardcoded Java files. And each and every one is slightly unique, which makes it a nightmare to write some sort of universal code to modify them. To avoid this in fabric I suggest a universal ore generator that take json files and uses them to generate ore. In addition this will give mod pack makers more control. Here is what I have come up with so far:
copper_ore.json
block: The block that will be generated.
generation_area: array of areas. Each has:
max_height: max y POS this ore can generate at
min_height: duh
biome: List of biomes this generationArea applies to
attempts: How many attempts to spawn ores every chunk
max_size: maximum vein size
min_size: minimum vein size
probably include other functions other than "random number of ores between min and max"?
density. How dense this vein is. 1 means that this vein will only contain ore blocks, 0.5 that half of the blocks will be stone…
vein_shape: shape of the vein. (Sphere, Cube,...)Common resources: It has been mentioned before by someone else and tbh I think it's a really good idea: try to make each resource unique and not just more powerful the more rare they are. So e.g. have copper tools be extremely weak but make it a primary component for electrical parts and machines. Silver could have superior magical properties and gold could be used in more advanced parts (circuits).
Hello, i discovered this project, i think it's a good idea.
In a way it's remind me how ex nihilo creatio was making the resource.
But instead of creating your own material. You had the possibility to create resource, there was a commoon texture for ore ingot ect ... and You had the possibility to specify the rgba value of them.
Example : { "name": "gold", "color": { "r": 1.0, "g": 1.0, "b": 0.0, "a": 1.0 }, "result": { "name": "minecraft:gold_ingot", "meta": 0 } },
When i see the doc, and the format you postponed here, it would be great for modpack maker, and for mod maker to be able to create your own ore by json.
Hi! Ultimately, we've just decided to add ores ourselves (even ores which are not required by UnitedManufacturing), and add as many ores as possible.
I understand what you're asking; ultimately, there are a lot of problems with adding arbitrary ores, one of which is that the server might be headless, requiring either some really dicey dancing around graphics classes to prevent harmful classloads on the server, or using imageio and loading in a lot of manual CPU-side image code for things the GPU could do trivially. I'd favor the latter if we did it, and I'm not saying no, but we're focused on a working featureset and something like this wouldn't happen any time soon.
So do people just "claim" certain ores for their mods, which you enable somewhere on the config before generating a world?
Yes! We've moved this all to data packs. We just need to add documentation to the wiki.