#trying to reduce generated structures

1 messages · Page 1 of 1 (latest)

dull light
#

Helping someone host a private survival server with large biomes, and we feel there are too many generated structures. I tried asking chatgpt for help and no luck. It made me make a datapack folder looking like this:
reducedstructure

  • pack.mcmeta
  • data
    -- minecraft
    --- worldgen
    ---- structure_set
    ----- village.json

pack.mcmeta contains this:
{
"pack": {
"pack_format": 15,
"description": "Reduces vanilla structure spawn rates"
}
}

and village.json contains this:
{
"structures": [
{ "structure": "minecraft:village_plains", "weight": 1 },
{ "structure": "minecraft:village_desert", "weight": 1 },
{ "structure": "minecraft:village_savanna", "weight": 1 },
{ "structure": "minecraft:village_snowy", "weight": 1 },
{ "structure": "minecraft:village_taiga", "weight": 1 }
],
"placement": {
"type": "minecraft:random_spread",
"spacing": 640,
"separation": 120,
"salt": 10387312
}
}

I am not a good coder and it's probably obvious to someone experienced with this, i just want this to work, hopefully understand it enough so i can repeat it with other things without coming back asking more questions

oak flintBOT
ashen sequoia
solemn lantern
#

Now by sheer luck, this structure_set file does happen to be correct, and will make villages incredibly rare

#

If you want to reduce the frequency of other structures too, you'll need to overwrite their structure_set files as well. You can find those on Misode as presets, or in the vanilla data pack inside your version's jar.

If you want to adjust the village frequency from here, check out that guide to see what values in this file to adjust

dull light
solemn lantern
#

What Minecraft version?

#

Also if you add the data pack after worldgen, yeah you're gonna get inconsistent results

dull light
#

1.21.11

solemn lantern
#

Your pack.mcmeta is outdated, the pack may not be loading
https://minecraft.wiki/w/Pack.mcmeta

Minecraft Wiki

The pack.mcmeta file is used to define metadata of a resource pack or data pack. The presence of this file identifies a directory or ZIP archive file as a resource pack or data pack.

dull light
dull light
#

so what i've found is that the structures generate per biome, and istead of having one village json, i need one for each biome

#

testing this now

solemn lantern
#

Not quite

#

Individual structures do only generate in valid biomes, but their frequency is handled here in the structure_set file, and for villages, each biome variant is collected in one structure_set file.

What this means in practice is that the game makes an attempt to spawn a village every X chunks according to the spacing and separation here, then checks the biome at that attempted location. If it's one of the biomes that one of those listed village types can spawn in, it generates that village. Otherwise, it skips that attempt

dull light
solemn lantern
#

It may not be working, but the solution is not a different structure_set file for each village type

dull light
#

or is the datapack only adding additional villages at these spacings? so vanilla spawns occur on top of the sparse ones i'm trying to generate?

solemn lantern
#

We need to actually figure out why it's not working.

solemn lantern
#

Have you checked what the vanilla village structure_set file is called?

#

It may not be village

dull light
#

no idea how to check that

solemn lantern
#

You can look at the presets on Misode, or open up your Minecraft jar with an archive program like 7Zip or WinRAR and take a look at the internal data pack via the data folder

dull light
#

i think my only issue right now is the mcmeta file, my datapack says broken when i try to load it, however i check the version (94.1 or 94.0) and it should be correct, am i missing something?

here's the contents:

{
"pack": {
"description": "Reduced Structures Datapack",
"pack_format": 94.0
}
}

#

also pulled the json contents of the minecraft data folder to find the correct script to use for spacing etc.

solemn lantern
#

That's not correct syntax

#

In lieu of the deprecated pack_format field, you need min_format and max_format, and their values must be in the form of [94,0], not 94.0

#

This is all on the wiki page I shared

dull light
#

i got it working with the help of someone in VC:

solution:

the correct pack format was found with the command /datapack create test while in a singleplayer creative game: then i copied the pack.mcmeta content.

then for the structure editing, it was copying the data file from the java folder (appdata, roaming, .minecraft, versions, the version you're using, open the jar file with winrar and copy the data folder to the desktop) then i found the root for villages and copied the content and edited spacing and separation numbers for the correct spacing in the minecraft world. (testing this out right now, as i want sparse but not impossible to find villages)