Prebuilt Worlds Data

Prebuilt worlds are the hand built Kingdom Keys worlds (eg. Destiny Islands, Daybreak Town). They have two parts:

The dimension and dimension_type files are vanilla Minecraft data pack files (see dimension and dimension type on the Minecraft wiki), only the generator is specific to Kingdom Keys. To make a new world reachable with the Gummi Ship it also needs a Gummi World file.

Prebuilt world generator

Set as the generator of a dimension JSON, here is its structure:

Example: dimension/daybreak_town.json

{
  "type": "kingdomkeys:daybreak_town",
  "generator": {
    "type": "kingdomkeys:prebuilt_world_generator",
    "world": "kingdomkeys:daybreak_town",
    "origin": [0, 64, 0],
    "sea": {
      "water": "minecraft:water",
      "level": 66,
      "floor": 64,
      "variation": 2,
      "surface_depth": 4,
      "body": "minecraft:stone",
      "surface": "minecraft:sand",
      "bedrock": "minecraft:bedrock"
    },
    "biome_source": { "type": "minecraft:fixed", "biome": "minecraft:warm_ocean" }
  }
}

Exporting a world

Build the world in any dimension (creative works best), then run as an operator:

/kingdomkeys export <name> <from> <to> [entities]

The files are written to <game folder>/kingdomkeys/exports/<name>/: a manifest.nbt plus one <x>_<z>.nbt piece per chunk (empty chunks get no file). Running the command again with the same name merges into the existing export, so a big world can be exported in several parts. Copy the whole folder to data/<namespace>/kk_worlds/<name>/ in your data pack and point a dimension's world field at it.