const overrideTFCWorldPreset = (/** @type {Internal.DataPackEventJS} */ event) => {
  // Reverts DFC's override of TFC's world present, removing DFC's new stone variants
  // from the world gen. This is just a copy/paste of TFC's world preset,
  // will need updates if TFC changes their worldgen. This is done because DFC stones are
  // incompatible with existing ores that lack variants for these stone types.
  const worldPreset = {
    "dimensions": {
      "minecraft:overworld": {
        "type": "minecraft:overworld",
        "generator": {
          "type": "tfc:overworld",
          "biome_source": {
            "type": "tfc:overworld"
          },
          "settings": "minecraft:overworld",
          "tfc_settings": {
            "spawn_distance": 4000,
            "spawn_center_x": 0,
            "spawn_center_z": 0,
            "rock_layer_settings": {
              "rocks": {
                "granite": "tfc:granite",
                "diorite": "tfc:diorite",
                "gabbro": "tfc:gabbro",
                "shale": "tfc:shale",
                "claystone": "tfc:claystone",
                "limestone": "tfc:limestone",
                "conglomerate": "tfc:conglomerate",
                "dolomite": "tfc:dolomite",
                "chert": "tfc:chert",
                "chalk": "tfc:chalk",
                "rhyolite": "tfc:rhyolite",
                "basalt": "tfc:basalt",
                "andesite": "tfc:andesite",
                "dacite": "tfc:dacite",
                "quartzite": "tfc:quartzite",
                "slate": "tfc:slate",
                "phyllite": "tfc:phyllite",
                "schist": "tfc:schist",
                "gneiss": "tfc:gneiss",
                "marble": "tfc:marble"
              },
              "bottom": [
                "gneiss",
                "schist",
                "diorite",
                "granite",
                "gabbro"
              ],
              "layers": [
                {
                  "id": "felsic",
                  "layers": {
                    "granite": "bottom"
                  }
                },
                {
                  "id": "intermediate",
                  "layers": {
                    "diorite": "bottom"
                  }
                },
                {
                  "id": "mafic",
                  "layers": {
                    "gabbro": "bottom"
                  }
                },
                {
                  "id": "igneous_extrusive",
                  "layers": {
                    "rhyolite": "felsic",
                    "andesite": "intermediate",
                    "dacite": "intermediate",
                    "basalt": "mafic"
                  }
                },
                {
                  "id": "igneous_extrusive_x2",
                  "layers": {
                    "rhyolite": "igneous_extrusive",
                    "andesite": "igneous_extrusive",
                    "dacite": "igneous_extrusive",
                    "basalt": "igneous_extrusive"
                  }
                },
                {
                  "id": "phyllite",
                  "layers": {
                    "phyllite": "bottom",
                    "gneiss": "bottom",
                    "schist": "bottom"
                  }
                },
                {
                  "id": "slate",
                  "layers": {
                    "slate": "bottom",
                    "phyllite": "phyllite"
                  }
                },
                {
                  "id": "marble",
                  "layers": {
                    "marble": "bottom"
                  }
                },
                {
                  "id": "quartzite",
                  "layers": {
                    "quartzite": "bottom"
                  }
                },
                {
                  "id": "sedimentary",
                  "layers": {
                    "shale": "slate",
                    "claystone": "slate",
                    "conglomerate": "slate",
                    "limestone": "marble",
                    "dolomite": "marble",
                    "chalk": "marble",
                    "chert": "quartzite"
                  }
                },
                {
                  "id": "uplift",
                  "layers": {
                    "slate": "phyllite",
                    "marble": "bottom",
                    "quartzite": "bottom",
                    "diorite": "sedimentary",
                    "granite": "sedimentary",
                    "gabbro": "sedimentary"
                  }
                }
              ],
              "ocean_floor": [
                "igneous_extrusive"
              ],
              "volcanic": [
                "igneous_extrusive",
                "igneous_extrusive_x2"
              ],
              "land": [
                "igneous_extrusive",
                "sedimentary"
              ],
              "uplift": [
                "sedimentary",
                "uplift"
              ]
            },
            "temperature_scale": 20000,
            "rainfall_scale": 20000,
            "flat_bedrock": false,
            "continentalness": 0.5
          }
        }
      },
      "minecraft:the_nether": {
        "type": "minecraft:the_nether",
        "generator": {
          "type": "minecraft:noise",
          "biome_source": {
            "type": "minecraft:multi_noise",
            "preset": "minecraft:nether"
          },
          "settings": "minecraft:nether"
        }
      },
      "minecraft:the_end": {
        "type": "minecraft:the_end",
        "generator": {
          "type": "minecraft:noise",
          "biome_source": {
            "type": "minecraft:the_end"
          },
          "settings": "minecraft:end"
        }
      }
    }
  }

  event.addJson('tfc:worldgen/world_preset/overworld.json', worldPreset)
}
