SGCraft Wiki

World generation

The world makes naquadah ore deep underground and builds gates at some of its structures and villages, each with a DHD and often a Tok'ra keeping watch. Some generated gates have a chest beside them holding a ZPM. SGCraft also adds naquadah, crystals and ingots to some vanilla chests.

Naquadah ore

Naquadah ore generates in the Overworld by default, in two ways. With the default settings, every chunk tries both.

  • Under lava, the chunk picks from 1 to 16 random columns (max_nodes_under_lava) and searches each from the bottom of the world up to sea level. Wherever lava rests on stone, that block starts a cluster of ore up to 3 blocks across and 1 block high.
  • As isolated nodes, the chunk gets from 1 to 4 nodes (max_isolated_nodes), each up to 2 by 2 by 2 blocks. A node starts 16 to 31 blocks above the bottom of the world, which is y -48 to -33 in the Overworld.

Ore replaces only natural stone: the blocks in the sgcraft:naquadah_ore_replaceables block tag, which holds #minecraft:base_stone_overworld (stone, granite, diorite, andesite, tuff and deepslate). It never replaces bedrock, chests, furnaces or anything else a player built from other blocks. A data pack can add blocks to the tag for worlds made of other stone. A cluster or node stops at the edge of its chunk.

Mining

PropertyValue
Hardness3
ToolIron pickaxe or better
Drops1 to 2 naquadah, more with Fortune
Silk TouchDrops the ore block
Experience2 to 5

Naquadah fuels DHDs and battery chargers, charges batteries in the crafting grid, and goes into naquadah alloy ingots and several recipes. See Naquadah.

Adding ore to old chunks

Chunks made before SGCraft was added have no naquadah ore. With add_ores_to_existing_worlds on (the default), each such chunk gets its ore when it loads, up to 32 chunks a tick. The world marks every chunk that has had its ore, whether new or old, so no chunk gets ore twice.

Server admins

The worldgen.naquadah_ore object in config/sgcraft-server.json:

SettingDefaultWhat it does
enable_naquadah_oretrueWhether naquadah ore generates at all
gen_under_lava_odds1One chunk in this many gets clusters under lava. 0 for none
max_nodes_under_lava16The most columns of a chunk searched for lava
gen_isolated_odds1One chunk in this many gets isolated nodes. 0 for none
max_isolated_nodes4The most isolated nodes a chunk gets
worlds["*", "!minecraft:the_nether", "!minecraft:the_end"]The worlds naquadah ore generates in. See Choosing worlds
add_ores_to_existing_worldstrueWhether chunks made without ore get it when they load

/sgcraft ore lists these settings. /sgcraft ore <setting> <value> changes one, and /sgcraft ore worlds <add|remove> <pattern> changes the worlds. Changes apply to chunks generated or loaded from then on and are written to the settings file. /sgcraft ore chunk [<x z>] tells whether a chunk has had its ore. Add generate to give that chunk ore now, or unmark to have it get ore again the next time it loads while add_ores_to_existing_worlds is on.

Choosing worlds

worlds is a list of patterns. Each is one of:

  • A world's id, such as minecraft:overworld.
  • *, for every world.
  • namespace:*, for every world from one mod or data pack, such as example:*.
  • Any of these after !, for worlds left out.

Ore generates in a world that some pattern takes in and no ! pattern leaves out. The default, ["*", "!minecraft:the_nether", "!minecraft:the_end"], covers the Overworld and any world a mod or data pack adds. Ore only replaces natural stone, so a world made of other blocks gets none unless a data pack adds them to the tag.

A data pack can change the ore block and the blocks it replaces through the sgcraft:naquadah_ore feature.

Structure gates

Some vanilla structures get a gate when they generate, built into the structure or on a platform nearby. Each structure has a 25% chance of a gate. A generated gate has 9 chevrons 25% of the time, otherwise 7. Every gate comes with a DHD holding 3 naquadah.

StructureTemplateWhere the gate standsGateTok'ra
Desert pyramidpyramid_hallIn a chamber in the middle of the pyramid's hallMilky WayYes
Jungle templejungle_roofOn the temple's roofMilky WayYes
Ocean monumentocean_shrineIn a shrine in place of the monument's top, under the seaMilky WayNo
Nether fortressnether_chamberIn a chamber on the fortress's first crossing, with a doorway onto each bridgeMilky WayNo
Swamp hutswamp_platformOn a platform 10 to 29 blocks away along each axisMilky WayYes
Igloosnowy_platformOn a platform 10 to 29 blocks away along each axisPegasus, with a Pegasus DHDYes

A platform stands on a stone brick foundation down to the ground. One platform in ten is sunk 1 to 3 blocks, half buried. A platform that has no room clear of the structure after 8 tries isn't built.

Village gates

Plains, desert, savanna, snowy and taiga villages can build a gate plaza among their houses, including zombie villages. The plaza joins each village's pool of houses as one more piece, with a weight of 2 by default. The houses keep their own weights, so the plaza takes a small share of the picks from each of them.

A village builds one gate at most. A plaza within 80 blocks of a gate already built stays empty. A village gate is a Milky Way gate with a DHD, with 9 chevrons 25% of the time, and a Tok'ra stands in front of it.

Generated gates

The world builds its gates from gate spawners in the templates, once the world runs. A gate built this way is generated:

  • It has no owner, so operators manage it. See Access.
  • The configurator shows "Built by: World".
  • Players can't break it unless its Breakable setting is on, or gates.generated_gates_breakable is on for gates without a setting of their own.

ZPM chests

When the world builds a gate, in a structure or a village, there is a 15% chance (zpm.chest_chance) that a chest stands beside it holding one full Zero Point ModuleZero Point Module. The chest stands 2 blocks in front of the base and 4 to one side, clear of the ring, where there is room on firm ground. This is the only place ZPMs are found.

One chest ZPM in ten is tainted (zpm.tainted_chance). A tainted ZPM shines like an enchanted item, and a ZPM console, interface cart or hub holding one explodes when it is drawn on. It is safe in a supergate's base or a city shield generator. See Tainted ZPMs.

Server admins

  • zpm.chest_chance (15) is the percent of generated gates with a ZPM chest, 0 to 100. 0 turns the chests off.
  • zpm.tainted_chance (10) is the percent of chest ZPMs that are tainted, 0 to 100.
  • /sgcraft zpm chest_chance <value> and /sgcraft zpm tainted_chance <value> change them. See Settings.

Tok'ra villagers

The Tok'ra are villagers who keep watch over generated gates and trade the crystals a gate is built from. When a generated gate is built, one Tok'ra spawns in front of it, 2 to 5 blocks out and up to 2 blocks up, where there is ground and room to stand. It never despawns. Gates in ocean monuments and Nether fortresses have no Tok'ra.

A Tok'ra works at a DHD (Milky Way or Pegasus), which no other villager takes as a job site.

TradeWantsGivesUses
Core crystal8 emeralds and 1 diamond1 Stargate Core Crystal12
Controller crystal16 emeralds and 1 diamond1 Stargate Controller Crystal12

Each trade gives the Tok'ra 5 experience. A data pack can change the trades through the trade set sgcraft:tokra/level_1.

Server admins

  • worldgen.tokra_worlds turns the Tok'ra on or off for each world's generated gates, by the world's identifier. The default is {"minecraft:overworld": true}. A world left out has Tok'ra wherever its structures' settings say.
  • /sgcraft worldgen tokra lists the worlds in worldgen.tokra_worlds, each on or off. /sgcraft worldgen tokra <world> <true|false> sets one.
  • /sgcraft tokra puts a Tok'ra in front of your selected gate, or the one you look at.

Chest loot

SGCraft's loot rolls alongside the vanilla loot in these chests:

ChestChanceRollsItems
Dungeon20%1 to 2Naquadah (1 to 8), ender pearl, Stargate Core Crystal, Stargate Controller Crystal
Bonus chestAlways1 to 2Stargate Core Crystal (1 to 2), Stargate Controller Crystal (1 to 2)
50%1Naquadah Alloy Ingot (32 to 64)
75%1Naquadah (8 to 16)
50%1Ender pearls (6 to 24)
Stronghold library75%1 to 2Stargate Core Crystal, Stargate Controller Crystal
Village weaponsmith and toolsmith50%1 to 2Naquadah Alloy Ingot (1 to 8), Stargate Core Crystal, Stargate Controller Crystal
Mineshaft, desert pyramid and jungle temple25%1A gate address book

A gate address book is a tattered written book titled "Stargate Address". Its page holds the address of one gate that world generation built, picked at random, as dialed from the world the chest is in. A gate with Address shown off, or one no address reaches from that world, isn't picked. With no such gate, the chest gets no book. The book is made when the chest is first opened, so it can name gates generated after the chest was.

In the dungeon, naquadah, pearls and core crystals each come up twice as often as controller crystals. In the stronghold library, controller crystals come up twice as often as core crystals. In the smiths' chests, ingots come up twice as often as each crystal.

The tables are sgcraft:chests/simple_dungeon, spawn_bonus_chest, stronghold_library and village_blacksmith. A data pack changes or empties SGCraft's share by replacing them.

Server admins

Structure gates

worldgen.structure_gates in config/sgcraft-server.json lists the structures that get gates, by the structure's identifier. A structure left out gets none. Each entry has:

FieldDefaultWhat it does
templateThe structure template the gate is built from
chance25How many structures in a hundred get a gate
placementbesideinside the structure, or beside it
min_distance, max_distance10, 30How far from the structure a gate beside it stands, along each axis, from min_distance up to and including max_distance
groundsurfaceWhat the gate stands on: surface (land or the water on it), ocean_floor, structure (the bottom of the structure's first piece) or structure_top (its top)
y_offset0Blocks up or down from there
foundationfullWhat holds up a gate beside a structure: none, full (the whole bottom layer filled down to solid ground) or corners (a 2 by 2 pillar under each corner)
foundation_blockminecraft:stone_bricksThe block the foundation is made of
chevron_upgrade_chance25How many gates in a hundred have 9 chevrons
tokratrueWhether a Tok'ra stands at the gate

The Default column gives what an entry gets for a field it leaves out. The default entries for the swamp hut and igloo set max_distance to 29, so their platforms stand 10 to 29 blocks away, as in the original. The default entries for the four structures with gates inside set foundation to none, and those for the ocean monument and Nether fortress set tokra to false.

worldgen.village_gates sets the plazas:

FieldDefaultWhat it does
weight2How often a plaza is chosen against the pool's other pieces, 0 to 150. 0 adds no plazas
poolsThe five biomes' house poolsThe plaza template for each pool of houses
tokratrueWhether a Tok'ra stands at a village's gate

/sgcraft worldgen lists the structures set to have gates and their chances. /sgcraft worldgen always true gives every such structure a gate until the server stops, for trying them out. /sgcraft worldgen always false goes back to their chances.