The mechanics of mob spawning in the sky

This forum is for anything that doesn't specifically have to do with Better Than Wolves
Post Reply
Six
Posts: 599
Joined: Sat Jun 02, 2012 6:27 am

The mechanics of mob spawning in the sky

Post by Six »

This just details some of my ongoing explorations into the weird ways in which the spawning of hostile mobs at high y values seems to work. Perhaps someone more knowledgeable than me knows what's going on.

So with the return to mob farms in BTW, I set about making a skyisland mob farm 128 blocks up from the ground. I soon found out however, that hostile mob spawning up that high is whack. First thing I encountered was (the already known) bug of no spawning higher than y=240. "No problem" I thought to myself, building another trap below that first one, and while it does (sometimes) produce mobs, it seems it is not that simple.

Just some of the details of the spawner first:
Spoiler
Show
Image
  • Simple 2 high stacked spawnpad design, with 4 floors, and 4 pads with a + shaped vine covered drop on each floor.
  • Top floor head height is y=237, bottom floor is y=228.
  • Killing happens at around y=216.
  • Height I intend to stand while it is in operation is y=197.
  • Has pillars with glowstone going through for lighting, such that they can be pushed by pistons to have the glowstone hidden in the floors giving off no light.
  • Original farm above it is all light up.
So, the strange thing that is happening is that it will produce mobs for a little while, but always seems to end up 'running dry'. I've tried to narrow down when this happens and how to get them spawning again, but it's really inconsistent. Sometimes logging off and back on will cause another 5-10 mobs to spawn, sometimes that does nothing. Sometimes when logging in down below and riding the elevator up to the island, it will be producing lots and have already accumulated over a soulsand-hopper worth of dragon orbs, eventually drying out over a few minutes. When I went up to top and tore the top level off the old farm (with the intention to rework the entire thing), it produced enough mobs to take me from around level 20 to 54 and fill up over a chest worth of item drops.

I've even gone so far as to get MCP and start looking through the source to try and work out what might be causing it. However, after reasoning through most of the AnimalSpawning code and all the methods it calls I'm still none the wiser, and nothing in there deeply depends on the y value, beyond the spot where the (rather easy to fix) 'no spawns above y=240' bug is. It's also not a problem that is seen in Mrchaim's awesome mega sky farm /sorter either, so I have no idea what is going on.

So yeah, I'm at a loss. Any ideas on what it might be, or other things I can test to try and work it out?
User avatar
Stormweaver
Posts: 3230
Joined: Wed Jul 06, 2011 7:06 pm

Re: The mechanics of mob spawning in the sky

Post by Stormweaver »

You know where it says 'lc:207' right next to the biome data? It's the y value to which nearby chunks are loaded, and if it's less than 255, spawning messes up in skytraps.

If you climb to the top of your spawner, then go back down to where you are, it should work fine IIRC.
PatriotBob wrote:Damn it, I'm going to go eat pumpkin pie while I still think that it tastes good.
Six
Posts: 599
Joined: Sat Jun 02, 2012 6:27 am

Re: The mechanics of mob spawning in the sky

Post by Six »

Stormweaver wrote:You know where it says 'lc:207' right next to the biome data? It's the y value to which nearby chunks are loaded, and if it's less than 255, spawning messes up in skytraps.

If you climb to the top of your spawner, then go back down to where you are, it should work fine IIRC.

Standing below it with 255, no spawning:
Spoiler
Show
Image
Derzuel
Posts: 58
Joined: Mon Dec 05, 2011 11:49 pm

Re: The mechanics of mob spawning in the sky

Post by Derzuel »

Now don't quote me on this, but if I recall correctly that around about the time they expanded the maximum height to 256 FC said he would alter the mob spawn code so that mobs wouldn't spawn above a certain height as he felt that mob farms should be a reward for managing a large area to make one work, and not for climbing way high up in the sky and building a few platforms.

Course I could be wrong, but I think that was the general gist of it, so don't go quoting me on it.
User avatar
Ultionis
Posts: 109
Joined: Sat May 26, 2012 7:52 pm

Re: The mechanics of mob spawning in the sky

Post by Ultionis »

I'm curious about this myself, as I too have built a failed mobtrap. The spawning area was just above cloud level, at around Y=133, which is notably much lower than your build. Since the spawn rate was abysmally low, I abandoned it and built a new trap much lower, with the lowest floor being at Y=75, about 2 chunks further from my base. Works like a charm now.
Stormweaver wrote:You know where it says 'lc:207' right next to the biome data? It's the y value to which nearby chunks are loaded, and if it's less than 255, spawning messes up in skytraps.
Does this imply that everything from bedrock up to the lc value is loaded? Or to put it otherwise, would machinery at bedrock level still function whilst the player is cavorting at Y=256?
I dance to the sound of a Creeper's legs breaking
Six
Posts: 599
Joined: Sat Jun 02, 2012 6:27 am

Re: The mechanics of mob spawning in the sky

Post by Six »

Ultionis wrote:Does this imply that everything from bedrock up to the lc value is loaded? Or to put it otherwise, would machinery at bedrock level still function whilst the player is cavorting at Y=256?
I believe yes. My ground base is only a few chunks over from this skyisland, and everything seems to carry on down there and I come back to full grown reeds.
Post Reply