Minecraft – Are Strongholds more common in Swamp Biomes

minecraft-java-edition

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?

Best Answer

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.