Are Strongholds more common in Swamp Biomes?

In my experience with generating new worlds and finding the stronghold is close, they've almost always been in a swamp biome. Is this intentional, a bug, or just a coincidence?

• I think it's just coincidence. – Ric Mar 9 '12 at 13:25
• I have yet to find a Stronghold, so I cannot comment on that, however, Abandoned Mineshafts have a pretty much regular tendancy to show up underneath desert biomes... coincidence? – Ender Mar 9 '12 at 13:59
• When I first came here, this was all swamp. Everyone said I was daft to build a castle on a swamp, but I built in all the same, just to show them. It sank into the swamp. So I built a second one. That sank into the swamp. So I built a third. That burned down, fell over, then sank into the swamp. But the fourth one stayed up. – Brandon Mar 9 '12 at 15:13
• It all makes sense now! That's why there are 3 strongholds too! It's the 3 previous Swamp Castles, just sunk into the swamp! – Unionhawk Mar 9 '12 at 15:59

Well, according to the wiki article, it's totally random:

All Strongholds are located at random in a radius between 640 and 1152 blocks from the origin, 0/0. Due to the generation algorithm, the Stronghold proper may extend further in or out of that circle. The three strongholds are spawned at equal angles from the center point of the world (that is, each stronghold is 120 degrees from the others, measured from the origin.)

Strongholds are still limited to 3 in a world.[1] They can be located using an Eye of Ender.

This wasn't enough to definitively conclude anything, though, so I decided to look into the source code. Here's a snippet:

``````allowedBiomeGenBases = (new BiomeGenBase[]
{
BiomeGenBase.desert, BiomeGenBase.forest, BiomeGenBase.extremeHills,
BiomeGenBase.swampland, BiomeGenBase.taiga, BiomeGenBase.icePlains,
BiomeGenBase.iceMountains, BiomeGenBase.desertHills,
BiomeGenBase.forestHills, BiomeGenBase.extremeHillsEdge
});
``````

That code determines the allowed biomes for a stronghold. You'll notice that it includes a great variety of biomes. (This code is from 1.1, so jungle isn't in there, but it probably is in 1.2.3.)

The rest of the code is fairly uneventful, and includes no biasing or weighting to a certain biome. So no, swamps have the same probability as any other biome to generate a stronghold.

Upon experimentation, I have concluded that there is no one biome that spawns strongholds more. I loaded 3 randomly generated maps, which generated strongholds in the Extreme Hills biome, River biome, and Snow biome. The fact that before, I kept finsing them in the swamp was a coincidence.

Also, from the wiki:

All Strongholds are located at random in a radius between 640 and 1152 blocks from the origin, 0/0. Due to the generation algorithm, the Stronghold proper may extend further in or out of that circle. The three strongholds are spawned at equal angles from the center point of the world (that is, each stronghold is 120 degrees from the others, measured from the origin.)

Suggesting that because they generate at random, there is no way to predict the biome in which they generate. Essentially, they generate in the same way that villages, dungeons, and abandoned mine shafts generate.