Minecraft – How does Height play into hostile mob spawns

minecraft-java-edition

The Minecraft Wiki Spawn page goes into great detail about how hostile mobs spawn. But it omits details about how height plays into common spawns. It DOES mention how slimes require the chunks they spawn in to be at a certain height level, but I'm more concerned with how the rest of the common hostile mobs spawn. (Namely Zombies, Creepers, Skeletons and Spiders)

To clarify a bit:

Mobs spawn naturally within a 15×15 chunk (240×240 block) area around the player.

Ok, well, thats simple enough, one chunk is a 16×16 block centered on the player, got it.
But, thats a two dimensional measurement, and this is a VERY three dimensional game. Is height irrelavent in such spawning mathmatics? If so, wouldn't that mean that I could be at sea level, with a dark cavern at bedrock beneath me, and have some of the mobs I want to slay spawn all the way at bedrock rather than at the same height I am?

Or even more prevalent, (and the main reason behind the question reveals itself) I have a monster grinding tower that I've built. The tower currently has 6 floors with each floor boasting a 2 block high space for the mobs to spawn in. If you include an extra block for the actual 'floor' of each level of the tower, that makes 18 blocks high. Now if I'm near enough and far enough (as the reqs require for spawning) to and from from the tower for mobs to spawn inside of it, how (if at all) will the different high levels of the tower affect my spawn rates inside each floor?

Best Answer

I know that this question was asked a long time ago, but just thought I'd give an update and a correction for future people that read this. (please consider that things may also change in future)

Ok, so first of all, you mentioned that a Chunk is 16x16 block around the player. This is incorrect. A chunk is a section of the terrain and is nothing to do with where the player is. The chunk does not move. A chunk is a 16x16x256 (W,D,H). So for the mob spawning. The quote you gave is correct, however, does not note that it is centred around the chunk that the player is standing on. So 7 chunks in every direction from the border of the chunk you are standing in.

And now for your question :) Recently, (not sure when it started) height has become even more important for mob spawning and each chunk is split into segments. This is to reduce the amount the game has to render and does this by going up in 16 block segments starting from 1. So 17, 33, 49, etc. This is called the lc value and can be shown on the debug screen (F3). It is important for mob spawning, why? Because any segments in the chunk above the maximum segment that has anything other than air in do not get checked for spawning conditions. This therefore means that there are many less blocks to check which in theory will make your mob grinder or xp farm more efficient.

There is a fair amount more... however, I think this answers what you wanted. At least I hope it does ;) Best of luck guys.