mojira.dev
MCPE-12422

Vertical distance is ignored by the hostile mobs spawning rule

I've got a mob farm room 30x30. It's all rock (mostly cobblestone) and totally enclosed and unlit. There are 6x6 spawning pads with water canals between them. The room is centered below my house. The surface of the pads is 24 blocks below my house floor. Most of the nearby caves have been lit up. Absolutely nothing spawns here but bats. An identical build on my Xbox One spawns mobs like crazy, and I haven't even lit up nearby caves yet on that world. Is this a bug, or are the spawning rule for PE drastically different? Yes, I have checked to make sure it's not on peaceful.

Linked issues

Attachments

Comments 47

As I commented on this thread, the spawning rule for MCPE seems to be very different from other editions. That is, it seems hostile mobs don't spawn if there is a player within approx 40 horizontal block distance of a spawning block (correction: it turned out to be wrong. See my comment below). I can't say for certain but vertical distance is seemingly ignored by the rule. This is contrary to the following description in the wiki:

There must be no players and no player spawn points within a 24 block distance (spherical) of the spawning block

This would make sense, if that's the case. I'm hoping Mojang will weigh in here and confirm or deny. I'm thinking as a test, I can rebuild my spawn room about five or ten blocks deep, but centered sixty horizontal blocks away from my house. I'd need to have the center of the spawn room drop onto a water conveyer tunnel that moves them to the water elevator under my house. Think that would work? Might be a good weekend project.

The other question is if the PE has the forty block minimum horizontal spawn radius, what is the radius where they start having a chance to despawn?

Yet another question... Do NPC's affect spawn? That makes a difference as to whether I build this horizontally displaced spawn room toward the nearby village, which could help reduce the zombie spawn near the village. Or if I should build it away from the village, so the villagers don't prevent mob spawn by being too close to it.

I investigated this further and found out that my previous hypothesis only partially applies to the current version, 0.13.1 / iOS (I think things have changed somewhere around 0.12). I built 4 spawn pads of 6x6x2 empty area and measured the spawn rate with various distances from the outer boundary of pads. Render distance set to the maximum, difficulty set to easy, game mode creative, "Always Day" enabled in a flat world:

Distance

Spawn rate

20 blocks horizontally

6 mobs in 5 minutes

24 blocks horizontally

16 mobs in 5 minutes

30 blocks horizontally

10 mobs in 5 minutes

40 blocks horizontally

5 mobs in 5 minutes

20 blocks vertically

0 mobs in 5 minutes

24 blocks vertically

0 mobs in 5 minutes

30 blocks verttically

0 mobs in 5 minutes

40 blocks vertically

0 mobs in 5 minutes

So vertical distance is indeed ignored (which is a bug) but the horizontal limit seems to be 24 blocks as expected. The reason why the spawn rate decreased when I took far away is probably that some mobs were despawning before I see them getting out of the chamber. So I think despawning rule described in the wiki still applies to MCPE:

A mob that has had no player within 32 blocks of it for more than 30 seconds has a 1 in 800 chance of despawning on each game tick (1/20th of a second). Therefore, the half-life of monsters not within 32 blocks of a player is 27.73 seconds (after the initial 30 seconds have elapsed).

37 more comments
SuperGeniusZeb

@unknown I was able to reproduce this bug in Windows 10 Edition on a 32-bit device. I haven't tried it on a 32-bit Android device, however.

Thanks for correcting me there, I have been able to reproduce some issues on one device but not the other

According to the official changelog of 1.0.5 Beta Build 1, this bug has been 'fixed'.

I have come across this bug again on both Windows 10 64-bit and Android, on 1.2.3.

To test this, I created a superflat, peaceful world and a stick 140 blocks high, then a small platform 30 x 30 on top of that, which I stood at the edge of. I then put the difficulty on easy and set the time to night, then waited for 5 minutes.

What should have happened is monsters spawn on the platform that I made, and no monsters spawn beneath, as the platform was higher than 128 blocks above the ground.

However, after I set the time to day (to stop monsters spawning) I went back to ground level and found many monsters, showing that monsters are spawning lower than 128 blocks below the player.

[Mojang] Mega_Spud (Jay)

Please refer to ticket MCPE-28352 that describes the behaviour of mobs spawning more than 128 blocks away vertically.

Michael Davis

(Unassigned)

30909

Confirmed

Phone - iOS - iPhone 5S

iOS 9.2

entity-spawning

0.13.0 Beta 5, 0.13.0, 0.13.1, 0.14.0, 0.14.2, ..., 0.16.0, 0.16.2, 1.0.0, 1.0.3, 1.0.4.1

1.0.5.0

Retrieved