10

There's a rumour that passive mobs (pigs, cows, sheep) can only spawn on the highest solid block. In other words, they won't spawn on grass with a solid block roof over it, such as in an underground cave, a player-built barn, or a glass dome.

Is this true, as of Minecraft 1.0?

3
  • This looks like it'll require some digging through the code...
    – fredley
    Dec 13, 2011 at 11:09
  • Looking at the wiki it says they spawn near grass and light, but nothing about the height of those blocks. I don't know if this means that if you place grass at the bottom of a level then they will spawn there or not.
    – Goibon
    Dec 13, 2011 at 12:10
  • 1
    Just adding that the "rumour" which I'm 90% sure is true, but don't have the proof, is that it's the highest solid and non-transparent block. They won't spawn on glass if you make a glass roof, or leaves if you make a leaf roof while running on fancy etc.
    – Mr Smooth
    Dec 13, 2011 at 13:56

9 Answers 9

4

I'm no expert at Java, so this isn't a decisive answer, but I figure it can't hurt to post the code here anyway for others to decipher. From SpawnerAnimals.java:

(Comments mine)

private static boolean canCreatureTypeSpawnAtLocation(EnumCreatureType enumcreaturetype, World world, int i, int j, int k)
    {
        if(enumcreaturetype.getCreatureMaterial() == Material.water)
        // If it's a water creature...
        {
            return world.getBlockMaterial(i, j, k).getIsLiquid() && !world.isBlockNormalCube(i, j + 1, k);
            // Make sure it spawns in water
        } else
        {
            return world.isBlockNormalCube(i, j - 1, k) && !world.isBlockNormalCube(i, j, k) && !world.getBlockMaterial(i, j, k).getIsLiquid() && !world.isBlockNormalCube(i, j + 1, k);
            // Makes sure the block it's spawning on is opaque, that it's not water, and that there are at least 2 blocks of air overhead.
        }
    }

It does not appear that it checks whether the mob is spawning underground or not.

Anecdotally, wandering around for a while with an Xray texture pack produced only surface mobs, so I'm not sure what other guards might be put in place to prevent underground spawns.

1
  • 1
    It's probably just that it's very unlikely to find grass deep underground.
    – SaintWacko
    Dec 16, 2011 at 18:53
3

Passive mobs will spawn if the following conditions are met:

  • There is a grass block
  • There is 2x2x2 empty space
  • There is a light level above 7
2
  • A 2x2 empty space? Do you mean 2x2x2?
    – fredley
    Jan 17, 2012 at 10:18
  • Yea thats what I meant.
    – rshea0
    Jan 17, 2012 at 23:54
1

No, they can definitely spawn underground. I had a world where I had dug out a massive cavern, encasing all the lava in glass, then placed grass on top of the lava to create big underground islands. I had animals spawning on the grass, at level 13.

Edit: This was, however, in an older version of minecraft. I won't be able to check to see if that's still true until I get home.

1

Before they only spawned on chunk generation, I would have them spawn in my grass filled cave all the time, I think they still can, but grass is needed for them to spawn.

1

According to the Minecraft wiki: no, animals cannot spawn underground.

newly generated chunks will contain mobs...They will always spawn on the highest available block in a column i.e. the one that can see the sky. For an animal to spawn on it, this block must be opaque and the two blocks above it must be transparent. The block does not need to be grass nor does it need to be illuminated (as it does with [Monster] Spawning).

0

Yes, the passive mobs just need the right conditions. For Pigs, Cows and Chickens you will need light and grass. Getting grass deep underground with out an item hack can be a little difficult. One way would be to dig a hole up to the surface and let natural light strike a block of dirt. From that block you can then grow more grass and from your field of grass you will get passive mobs.

0

I beleive they can. I am playing in 1.7 and I found 3 chickens in my mineshaft.

At first I started to look for a way to get to the over world. After an hour or so of searching, I gave up and decided to google to see if they could spawn there.

0

I just found a chicken in my mine, around level 15. I searched and searched, and there are no entrances to the outside. The only possibility that I can think of is that there was a 3x3 patch of dirt in the mine, and a nearby lava source which may have exceeded the light requirement. However, there is obviously no grass around...

0

I found out that the only passive mob that spawns underground is the bat. I found this out while reading my Minecraft Essential Handbook, page 38. Chickens, pigs, cows, and sheep spawn on grass.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .