Marium's Soulslike Weaponry

Marium's Soulslike Weaponry

11M Downloads

[QUESTION] Disable generation config where?

Closed this issue ยท 5 comments

commented

Describe the question
I think I recall being able to disable structure and ore generation in the config in a past version of the mod but the config of the current latest version (1.3.1 1.20.1 fabric) doesn't have that capability. Am I misremembering or has that config been removed? If so, is there any other way for me to disable the generation features?

Is this missing in the wiki?
Yes.

Other relevant info
I'm making a modpack for some pals and I love the bosses but the rest doesn't fit the theme so I wanna disable pretty much everything else. Managed the items through item obliterator mod, though I'm not familiar with one that affects worldgen that I could use for this. Right now ores keep spawning and they simply yield nothing. Structures too.

commented

It got removed in newer versions since Mojang turned ore and structure generation into datapacks, so there is nothing to disable in the code. You can just make empty versions of the same datapack files to disable the structures or edit them yourself manually.

commented

Say, I figured I should be able to use a datapack, so I did look at the code here, based on which I made a pack where I replaced the contents of the json files with just {}. I thought I used the right directory but the datapack ended up not working. (Loaded a world, enabled the pack, tpd randomly far out to new chunks, ores still generated, structures could also be located using locate structure.)

The layout was:
datapack/
data/soulsweapons/worldgen/configured_feature/moonstone_ore.json verglas_ore.json
data/soulsweapons/worldgen/placed_feature/moonstone_ore_placed.json verglas_ore_placed.json

Datapack folder also contained the mcpackmeta file with the right code.

I'm not very familiar with datapack making, have I used the wrong layout? Or should I have enabled the datapack before world gen? Could you please point out the right way for me to do this?

Sorry and thanks for your time!

commented

I thought having an empty file would work but I guess not in this case. The structure you did is correct though, I tested it and you only need the placed_feature folder and files, with the files instead having their ore count set to 0 instead of being an empty file. So moonstone_ore_placed.json should look like this:

{
  "feature": "soulsweapons:moonstone_ore",
  "placement": [
    {
      "type": "minecraft:count",
      "count": 0
    },
    {
      "type": "minecraft:in_square"
    },
    {
      "type": "minecraft:height_range",
      "height": {
        "type": "minecraft:trapezoid",
        "max_inclusive": {
          "absolute": 16
        },
        "min_inclusive": {
          "absolute": -80
        }
      }
    },
    {
      "type": "minecraft:biome"
    }
  ]
}

And verglas_ore_placed.json should look like this:

{
  "feature": "soulsweapons:verglas_ore",
  "placement": [
    {
      "type": "minecraft:count",
      "count": 0
    },
    {
      "type": "minecraft:in_square"
    },
    {
      "type": "minecraft:height_range",
      "height": {
        "type": "minecraft:trapezoid",
        "max_inclusive": {
          "absolute": 300
        },
        "min_inclusive": {
          "absolute": -80
        }
      }
    },
    {
      "type": "minecraft:biome"
    }
  ]
}
commented

Indeed it works, thank you very much!

commented

No problem, glad to hear it!