Spectrum

Spectrum

2M Downloads

[Feature] An ability to configure dimensions in which Ancient Ruins generate

KonSola5 opened this issue ยท 10 comments

commented

As stated in the title.
This feature would help to fix an issue in Sky FABRICation 3, since in this pack structures are configured to spawn in a custom Sky Islands dimension (with Y: 0-256).

However, Ancient Ruins are nowhere to be seen, nor there is any config in Spectrum related to structure spawning.
MSandro/sky_fabrication3#72 (comment)

World features, like ruined Pedestals or geodes spawn fine though.

If there is a workaround (except skipping Ancient Ruins altogether by modifying advancements) let me know.

commented

That was a great attempt, but even when the contents of the biome tag are changed (which do work, because if there was no valid biome the /locate command would fail instantly, else it fails after not finding a structure in 10k+ (no idea) blocks.), Ancient Ruins do not generate...

Are there any special conditions for Ancient Ruins spawning involving being underground, at a certain Y level, etc.? (This world is generated in End Islands style, so there is a lot of void and few occasions where there is a lot of solid land).

commented

This already exists, albeit not in the config.
There is a Biome Tag https://github.com/DaFuqs/Spectrum/blob/1.19-deeper-down/src/main/resources/data/spectrum/tags/worldgen/biome/has_structure/underground_structures.json controls where they spawn. This tag can easily be expanded using data packs / tools like KubeJS

commented

Wow, that was quick. Thanks for help!

commented

They generate between y=32 and 32 blocks above the void.
May it be that those worlds have a min y of 0 (meaning void starts at y -1)?

commented

Yup, the world starts at Y = 0, not -64 like the normal Overworld.

commented

In this case you will want to adjust the spawn height in the structure config, too.

Set

  "start_height": {
    "type": "minecraft:uniform",
    "max_inclusive": {
      "absolute": 32
    },
    "min_inclusive": {
      "above_bottom": 32
    }
  },

to sensible values that make sense in the worlds terrain height and maybe change terrain adaption to "terrain_adaptation": "none", or beard_thin so it looks nicer when floating in the air

commented

Hmm, it seems that the modpack creator already changed the Y values from 0 to 256. (Mod version: spectrum-1.6.4-1.18.2-leisure_time). Here, the file structure is also different, instead of only one file like above, there are three files: one in "configured_structure_feature":

{
  "type": "spectrum:underground_structures",
  "config": {
    "start_pool": "spectrum:ancient_ruins",
    "min_y": 0,
    "max_y": 256,
    "size": 1
  },
  "biomes": "#spectrum:has_structure/underground_structures",
  "adapt_noise": false,
  "spawn_overrides": {
    "monster": {
      "bounding_box": "piece",
      "spawns": []
    }
  }
}

In "structure_set":

{
  "structures": [
    {
      "structure": "spectrum:ancient_ruins",
      "weight": 2
    }
  ],
  "placement": {
    "type": "minecraft:random_spread",
    "spacing": 64,
    "separation": 10,
    "salt": 1646207470
  }
}

And in "template_pool":

{
  "name": "spectrum:ancient_ruins",
  "fallback": "minecraft:empty",
  "elements": [
    {
      "weight": 2,
      "element": {
        "element_type": "minecraft:single_pool_element",
        "location": "spectrum:ancient_ruins",
        "projection": "rigid",
        "processors": "minecraft:empty"
      }
    }
  ]
}

But despite all of that, no dice.

commented

Aaaah, we are on 1.18.2, correct?
The set "spacing": 64 looks like quite a lot, maybe they are just super rare?

The existing template_pool that is included is definitely outdated. Spectrum 1.6.x added 2 new additional structures that would currently not generate as-is. You can replace it with https://github.com/DaFuqs/Spectrum/blob/1.18.2/src/main/resources/data/spectrum/worldgen/template_pool/ancient_ruins.json or probably even remove this override, so the file Spectrum ships with will take control again.

commented

Thank you so much for help! Finally managed to make Ancient Ruins spawn! (Maybe "weight": 2 was a part of this issue, too?)
gg

commented

"weight": 2 shouldn't be much of an issue there, but who knows. Happy that solved it, have fun!