-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Compatability with Snowcapped's biome_colors.json #5
Comments
Hi, creator of Snowcapped here. I've created the I've looked at your DataFormats and they don't look too different. A couple questions though:
I think it would make sense to establish a standard for those files. I am also happy to change my format to facilitate things that you need, though there are also a few datapacks (for example Terraltih) that do have these file following my format. To give some details on the format of these files as I use them currently. The {
"biome1": { "r": 250, "g": 145, "b": 248 }, // biome color for biome1 in same namespace as biome_colors.json
"other_namespace:biome2": { "r": 52, "g": 120, "b": 162 }, //biome color for other_namespace:biome2
//...
} See here for the data provided for the vanilla biomes. The {
"structure1": {"item": "minecraft:dark_oak_planks"}, //display structure1 using the dark_oak_planks item
"structure2": {"hidden": true}, //don't display structure2
"other_namespace:structure3": {"item": "minecraft:carved_pumpkin"},
//legacy format using simple strings also supported
"structure4": "minecraft:nether_bricks",
"structure5": "hidden",
//...
} See here for the data provided for vanilla structures. Instead of allowing separate icons, for now I am relying on vanilla items to be used as icons (when only dealing with datapacks you don't really have a place to add textures). |
Because world-preview has a feature to highlight all cave biomes :)
I do use the the default translations if they are available / use the same mechanism as the vanilla biomes / structures. The So, this is more an option to add a display name if there is none available and the heuristic for transforming the resources keys is insufficient.
I agree and I would be happy to switch to your format (and deprecate / remove my own) if all the required information would be present in yours. At a minimum I would need:
Having a display name for both biomes and structures would be nice to have. |
Maybe a biome tag would work for that, maybe
the hidden flag exists for 2 reasons:
So it is really for structures that shouldn't be shown on the map at all. It doesn't quite match your use case. For So I would propose the following starting from my format:
What do you think? |
Sounds good to me (mostly).
I would go with
What happens if both a specified? I would only support one format (
Would be nice if you could support them anyway in Snowcapped :)
I agree, this should be done for consistency. Something else I missed is that the namespace is optional in your format. I would prefer if this could be deprecated / removed since this behavior seems to be unique to these files. The namespace seems to be always mandatory for all other datapack files as far as I can tell (though I am by no means an expert here). Additionally, the new / updated format needs an official documentation (something similar to |
Maybe
Snowcapped is only a tool to create biome layouts, similar to the vanilla OverworldBiomeBuilder. So it only cares about biome ids and doesn't even read the biome files. Snowcapped is only part of this discussion as it has a color picker than can export biome colors. But sure, maybe I'll use
Sure, that sounds reasonable. The Snowcapped export does include the namespace always anyways. With that maybe it then makes sense to define which namespace to put the file into, like maybe the For context: I originally had it where the namespace couldn't be specified, always relying on the namespace of the file. The vanilla analogy to that is the
I'll work on a proper documentation soon. |
Sure, makes sense.
So, basically the color / structure resources would be in I am not an expert on data packs, so what would the expected behavior be when more then one data pack provides the same file (overwrite complete file / only duplicate keys)? |
Thats sort of the issue with these files. Usually it would override the complete file. That is obviously not great for these files. The vanilla analog is the So as long as its is just a single file the overriding per key is well defined, one pack just overrides the color defined in the lower packs. The problem I see is if packs define a color for the same biome, but in different files (i.e. in different namespaces), or even worse if a single datapack defines 2 different colors for the same biome in different files. That's why I would propose to simply have single place where to put the file, then the overriding is easy. I think it makes sense to put it in the I don't know how easy it is to get the overriding per key to work in a mod, I have the luxury of having implemented my own datapack loading, so haven't though much about the feasibility of this in a modded scenario. Maybe you should see if you can get that to work before we decide on a final format. |
OK, I did some testing (poking around in the sound manager implementation), and using the
Yes, this is annoying to deal with... I will have the problem anyway, since I want to support your the old formats. So, I would say that this would be undefined behavior in this case... |
I have implemented an initial version based on the discussion here. The new resources files can be found in https://github.com/caeruleusDraconis/world-preview/tree/1.20/src/main/resources/data/c There is also a converter for automatically converting to the new format. The only thing that currently isn't working is rendering the items on the map, because all the builtin minecraft item rendering logic directly renders to the screen, while world-preview renders everything to a texture first. However, this is not a problem with the format itself, but with the use of items as icons... |
So to recap that we are on the same page, the final format spec would be: Biome colors:One file per mod / datapack in {
"minecraft:beach": {
"r": 244,
"g": 238,
"b": 5
},
"minecraft:snowy_beach": {
"r": 249,
"g": 255,
"b": 150,
"name": "Snowy Beach" // Optional name field
}
} Additionally, {
"replace": false,
"values": [
"minecraft:dripstone_caves",
"minecraft:lush_caves",
"minecraft:deep_dark"
]
} Structure iconsOne file per mod / datapack in {
"minecraft:ruined_portal": {
// Texture icon for this structure
"texture": "world_preview:textures/structure/ruined_portal.png"
},
"minecraft:ruined_portal_desert": {
"texture": "world_preview:textures/structure/ruined_portal.png",
"name": "Desert Ruined Portal" // Optional name field
},
"minecraft:stronghold": {
// Specify an item instead of a texture
"item": "minecraft:ender_eye"
},
"minecraft:stronghold": {
// Specify a texture and an item fallback icon
"texture": "world_preview:textures/structure/chest.png",
"item": "minecraft:chest"
},
} Additionally,
Ideally, there would then also be a Does this sound ok / what you had in mind? |
That looks perfect! I'll work on implementing that into my tools very soon. One useful addition might be to allow both a Regaring the cave tag: It seems the convention is |
That's basically how I have implemented it already. I will update my previous comment to make things clearer.
Thanks for catching that. I have updated the my previous comment and the code to use the existing tags instead. |
Following new standard, as agreed on in caeruleusDraconis/world-preview#5
I have now implemented the changes into my datapack map, with the exception of Snowcapped is now also exporting into the new place, otherwise no changes were necessary. |
Closing, since the new format changes are now released with version 1.1.0. @jacobsjo Please let me know, once you have some official documentation for the new / updated data-format. |
@caeruleusDraconis I now have written the documentaion at https://github.com/jacobsjo/mc-datapack-map/wiki/Biome-and-Structure-Metadata. If should give datapack/mod makers enough guidance to make their datpacks/mods compatible. Let me know if you have any complaints. |
@caeruleusDraconis Heads up, the 1.20.5 tag unification PRs for NeoForge and Fabric are going to have |
Snowcapped is a tool for worldgen developers to easily create overworld-like biome configurations. Datapacks exported have a
biome_colors.json
file in each namespace's root, which lists the colors used.It'd be nice if any biomes that do not have a color assigned yet could default to the colors specified in this file. As of right now I have to manually convert the colors. I've written a script to quickly convert the format, but having it built into world preview would save me some time!
The text was updated successfully, but these errors were encountered: