So I read the OP post and I'm still quite confused. If .. say, I have a large hollow area under a building and I don't want any mobs to spawn there I just have to cover it in half steps and it'll stay completely clear from any life, no matter at which light level?
You are correct sir. Monsters do not spawn on water, glass and half steps, fairly sure this is true of ice as well.
Why not just build a surface level water channel system 144x144 on low-ish elevation?
I don't get all this "build under a lake" hullabaloo. Clearing out huge rooms is no easier than building a few channels, and this way, you can put it where you actually want it.
You could. But you would lose the daylight hours, putting it under a lake garuntees that the mobs can't spawn outside your channel system.(barring caves)
This makes me so happy I can not even begin to express.
Rollback Post to RevisionRollBack
In the beginning, Notch created the Nether and the Earth, and in it he made a man of sand and called him Steve. Notch made Steve strong so that he may punch wood, and lo, Steve was to have dominion over all square things.
- There is no more "bail out" algorithm (it haven't got put back after revert)
Hmm, I had the impression the bail out algorithm was still there. Please correct me if that's wrong.
Although I don't totally understand how it gets applied - when the first random location is picked, is that a random x,y and z within the chunk? so if z is between 64 and 128, it's probably air so you don't bail out? I can't quite figure out why anything spawns in things like the sky mob traps that drop mobs to the ground - it would seem like the random x,y,z would typically be below that, and the mobs would just spawn on the ground or in caves - if the ground is water and the caves are lighted, I don't see anything in the algorithm that says to see if you can spawn anywhere high up. Unless it just runs so fast and fails everywhere else that a huge number of tiny probabilites quickly adds up to a lot of monsters spawning.
- Nothing spawns within 24blocks "circle" around you/spawnpoint from bedrock to sky. (mob spawners are exception)
- Nothing spawns on water(source/current)/lava/halfrock/glass/midair/ice
- I have sometimes seen not moving creeper. That haven't moved/jumped until you got too close. Bug? Feature?
Pretty sure Absolutely certain it's a sphere with a radius of 24, not a cylinder. Just used a transparent stone texture to stand under a room and look straight up. Spiders spawned right overhead.
Ice is water, but haven't seen confirmation. The half-block no spawn rule is because the spawn routine doesn't look at "x and a half" locations, so doesn't apply to doubled half blocks.
Pathfinding glitch. Most frequent in places mobs can't jump, but it happens in open areas too.
So the radius from the spawn thing. In relation to the player, does the spawn block exist under the players feet, where their feet are, or where their head is, or some combination thereof, for purposes of the no spawn within your spawn point radius?
Also just for clarity, with a radius that extends 24 blocks beyond the spawn block the diameter is 49 blocks then, right (24*2+1 center block)?
I had a skeleton spawn on a stone half-tile today, and I KNEW I had read somewhere that they can't do that. What happened?
Half blocks stop being half blocks when they are stacked to create a full block.
@ 24-block radius: Your spawn point is actually not on a block, but rather on a corner of a block. I'd imagine it counts the corners of the blocks for the radius, too (but includes the blocks referenced by those corners). As for head/legs/ground, no idea. The ground I was on was actually 28 blocks away from the spot I was watching above me, to make sure I could not have been closer than 25.
I swear I saw two slimes spawn near flowing lava near bedrock.
I clearly remember it. It was after Notch mentioned the Halloween Update. The slimes were maybe size 3 out of 4 hopping around the lava.
I went back, used the sand glitch, and circled the area where they spawned:
Bucyruss: The code you'd stumbled on (that you thought was the mob spawner code) is actually the code that builds dungeons. The list you saw that includes "Zombie" twice is what mob type the spawner generates; zombie spawners are twice as likely as spider or skeleton spawners.
I'm with Katesw that the main spawning loop is in be.class. (Now called bg.class in 1.2.3.) The mechanics aren't a lot different than what's in the OP, with a few exceptions:
The area that things can spawn in has been enlarged, it's 17x17 chunks centered on your chunk. (The box extends for 8 chunks in each direction.) There's also an oddity in how mob limits are calculated: The code divides the number of chunks in this box by 256 and multiplies it by a constant which I suspect is supposed to be the mob limit. For hostile mobs this constant is 100, and it's 20 for animals. However, since the box is 17x17, the actual limits are 112 and 22, respectively.
The weird way of calculating seems to be to support multiplayer: every player adds a 17x17 box to the list of eligible chunks, but if two players are close the boxes will overlap. In that case the mob limit will be lower than if the players are spread out.
The "early out" part of the code is also gone, which is why the "0,0" exploit doesn't work anymore. Every chunk in the list has a 1-in-50 chance of trying to spawn, and since the whole list gets traversed all chunks are equal. The only exception is if you're close to the mob limit; in that case chunks earlier in the list will get a chance to spawn before the later ones. But that's a very small effect in an edge case; I wouldn't worry about it.
As in the old code, a square is chosen at random inside the target chunk. If it's non-empty we move on to the next chunk. Otherwise, we choose a mob at random from (zombie, spider, creeper, skeleton) and try to create a pack of up to 12(!) of them sorta-normally distributed around the empty square we found. This means if that square was way up in the air, nothing happens. Either way, after trying to spawn the pack we go on to the next chunk. Each of the 4 mob types is equally likely, and spawn in the same circumstances.
So what does this mean for practical mob trapping? If I've followed the code right, the lower mob limit combined with the wider spawn area makes it vital that you light/fill/whatever all the caves in your trap area; otherwise those caves will gradually fill with mobs, choking the effectiveness of your trap. Also, the lack of the "bail-out" clause means it is totally irrelevant to dig a deep pit anymore; the dominant factor is going to be the surface area of spawnable ground. I'd say that's good news for towers, except who's going to want to build a tower over a 272x272 area?!
Say I have a giant rock floor above my spawn (which I do) it is about 40-50 spaces above. Can mobs spawn there? There is no light in it and I was just wondering if mobs could spawn anywhere above you or your spawn if there are blocks and the proper darkness is met.
Say I have a giant rock floor above my spawn (which I do) it is about 40-50 spaces above. Can mobs spawn there? There is no light in it and I was just wondering if mobs could spawn anywhere above you or your spawn if there are blocks and the proper darkness is met.
My experience would lead me to say yes, I have 4 floors in my trap now, 2 at seabed level that are about 80 x 80, flat conveyor mover rooms, they are connected to my 2 lava level rooms by a drop-shaft I can monitor. my two lava level rooms will be 144 x 144 with a terraced water conveyor system when complete, still working on the lowest room.
The spawn in the lower rooms is huge but I still get a good flow coming down the drop-shaft from the rooms at seabed.
Apologies if this is a repost or a stupid question.
You said there's a 144x144 area around the player where mobs actively spawn -- how far does this extend vertically? Is it 144x144x144? Did I miss something spectacularly obvious? :smile.gif:
I'm trying to figure out a way to make a perfectly efficient mob grinder with optimal spawn rates, and I can't see how the spawn area works around the player.
Apologies if this is a repost or a stupid question.
You said there's a 144x144 area around the player where mobs actively spawn -- how far does this extend vertically? Is it 144x144x144? Did I miss something spectacularly obvious? :smile.gif:
I'm trying to figure out a way to make a perfectly efficient mob grinder with optimal spawn rates, and I can't see how the spawn area works around the player.
Thanks for any help!
Distances in the game are measured inconsistently.
The "no-spawn" safe area around players is a 24-block-radius sphere. That doesn't include dungeon spawners, which operate only at close range.
The spawning area (whether it is 144x144 or 272x272, don't know) is a grid-aligned square that extends the full 128-block height of the map. It considers the distance in the form of the "chunks" that the map is divided into, which are 16x16x128 sections.
That's spherical distance and square distance. Some distances are measured from blocks, others from corners of blocks. To round out the measuring methods (off topic) light propagates across block faces and counts block centers, essentially illuminating a 3D diamond.
So the "perfect" tower is a huge thing, covering everything you can see from the center of it (at far fog), extending from sky limit down to where you would stand at bedrock.
how do you stop a dungeon mob spawner from spawning mobs?
read the first couple of posts and searched the forum but this thread is as close I got to an answer
saw a video where the guy said light stopped them from spawning
but I've got torches on every block adjecent to the mob spawner and they keep spawning
I also read somewhere on here you needed to surround it with blocks
but completely built in they still occasionally keep spawning
makes building my arrow factory thing pretty difficult when they keep spawning right on me
had to set it to peacefull but I felt kinda cheap afterwards XD
Is there something special about how spiders spawn? I built a mob farm at the 0,0 chunk and I've gotten only 1 string out of it. (Later discovered that the 0,0 thing had been fixed, but it still works fine)
In a constant amount of time, these are the items I've gotten.
34 ]" title="-<->" /> feathers
84 [>>-i>] arrows
42 gunpowder
1 string
They weren't friendly, you had hostile pigs there. That solves it.
You are correct sir. Monsters do not spawn on water, glass and half steps, fairly sure this is true of ice as well.
You could. But you would lose the daylight hours, putting it under a lake garuntees that the mobs can't spawn outside your channel system.(barring caves)
This makes me so happy I can not even begin to express.
I'm looking for this answer as well.
I've started a new world and I'm almost ready to build my new monster trap.
Is the 0.0 chunk still the highest spawn rate?
viewtopic.php?f=35&t=93046&start=30
Hmm, I had the impression the bail out algorithm was still there. Please correct me if that's wrong.
Although I don't totally understand how it gets applied - when the first random location is picked, is that a random x,y and z within the chunk? so if z is between 64 and 128, it's probably air so you don't bail out? I can't quite figure out why anything spawns in things like the sky mob traps that drop mobs to the ground - it would seem like the random x,y,z would typically be below that, and the mobs would just spawn on the ground or in caves - if the ground is water and the caves are lighted, I don't see anything in the algorithm that says to see if you can spawn anywhere high up. Unless it just runs so fast and fails everywhere else that a huge number of tiny probabilites quickly adds up to a lot of monsters spawning.
Pretty sureAbsolutely certain it's a sphere with a radius of 24, not a cylinder. Just used a transparent stone texture to stand under a room and look straight up. Spiders spawned right overhead.Ice is water, but haven't seen confirmation. The half-block no spawn rule is because the spawn routine doesn't look at "x and a half" locations, so doesn't apply to doubled half blocks.
Pathfinding glitch. Most frequent in places mobs can't jump, but it happens in open areas too.
This.
Water! Who needs to spam caves with torches when a well placed water block can do the same job of blocking mob spawns?
I think this deserves a cookie:
Also just for clarity, with a radius that extends 24 blocks beyond the spawn block the diameter is 49 blocks then, right (24*2+1 center block)?
Half blocks stop being half blocks when they are stacked to create a full block.
@ 24-block radius: Your spawn point is actually not on a block, but rather on a corner of a block. I'd imagine it counts the corners of the blocks for the radius, too (but includes the blocks referenced by those corners). As for head/legs/ground, no idea. The ground I was on was actually 28 blocks away from the spot I was watching above me, to make sure I could not have been closer than 25.
I clearly remember it. It was after Notch mentioned the Halloween Update. The slimes were maybe size 3 out of 4 hopping around the lava.
I went back, used the sand glitch, and circled the area where they spawned:
I'm with Katesw that the main spawning loop is in be.class. (Now called bg.class in 1.2.3.) The mechanics aren't a lot different than what's in the OP, with a few exceptions:
The area that things can spawn in has been enlarged, it's 17x17 chunks centered on your chunk. (The box extends for 8 chunks in each direction.) There's also an oddity in how mob limits are calculated: The code divides the number of chunks in this box by 256 and multiplies it by a constant which I suspect is supposed to be the mob limit. For hostile mobs this constant is 100, and it's 20 for animals. However, since the box is 17x17, the actual limits are 112 and 22, respectively.
The weird way of calculating seems to be to support multiplayer: every player adds a 17x17 box to the list of eligible chunks, but if two players are close the boxes will overlap. In that case the mob limit will be lower than if the players are spread out.
The "early out" part of the code is also gone, which is why the "0,0" exploit doesn't work anymore. Every chunk in the list has a 1-in-50 chance of trying to spawn, and since the whole list gets traversed all chunks are equal. The only exception is if you're close to the mob limit; in that case chunks earlier in the list will get a chance to spawn before the later ones. But that's a very small effect in an edge case; I wouldn't worry about it.
As in the old code, a square is chosen at random inside the target chunk. If it's non-empty we move on to the next chunk. Otherwise, we choose a mob at random from (zombie, spider, creeper, skeleton) and try to create a pack of up to 12(!) of them sorta-normally distributed around the empty square we found. This means if that square was way up in the air, nothing happens. Either way, after trying to spawn the pack we go on to the next chunk. Each of the 4 mob types is equally likely, and spawn in the same circumstances.
So what does this mean for practical mob trapping? If I've followed the code right, the lower mob limit combined with the wider spawn area makes it vital that you light/fill/whatever all the caves in your trap area; otherwise those caves will gradually fill with mobs, choking the effectiveness of your trap. Also, the lack of the "bail-out" clause means it is totally irrelevant to dig a deep pit anymore; the dominant factor is going to be the surface area of spawnable ground. I'd say that's good news for towers, except who's going to want to build a tower over a 272x272 area?!
My experience would lead me to say yes, I have 4 floors in my trap now, 2 at seabed level that are about 80 x 80, flat conveyor mover rooms, they are connected to my 2 lava level rooms by a drop-shaft I can monitor. my two lava level rooms will be 144 x 144 with a terraced water conveyor system when complete, still working on the lowest room.
The spawn in the lower rooms is huge but I still get a good flow coming down the drop-shaft from the rooms at seabed.
You said there's a 144x144 area around the player where mobs actively spawn -- how far does this extend vertically? Is it 144x144x144? Did I miss something spectacularly obvious? :smile.gif:
I'm trying to figure out a way to make a perfectly efficient mob grinder with optimal spawn rates, and I can't see how the spawn area works around the player.
Thanks for any help!
Distances in the game are measured inconsistently.
The "no-spawn" safe area around players is a 24-block-radius sphere. That doesn't include dungeon spawners, which operate only at close range.
The spawning area (whether it is 144x144 or 272x272, don't know) is a grid-aligned square that extends the full 128-block height of the map. It considers the distance in the form of the "chunks" that the map is divided into, which are 16x16x128 sections.
That's spherical distance and square distance. Some distances are measured from blocks, others from corners of blocks. To round out the measuring methods (off topic) light propagates across block faces and counts block centers, essentially illuminating a 3D diamond.
So the "perfect" tower is a huge thing, covering everything you can see from the center of it (at far fog), extending from sky limit down to where you would stand at bedrock.
read the first couple of posts and searched the forum but this thread is as close I got to an answer
saw a video where the guy said light stopped them from spawning
but I've got torches on every block adjecent to the mob spawner and they keep spawning
I also read somewhere on here you needed to surround it with blocks
but completely built in they still occasionally keep spawning
makes building my arrow factory thing pretty difficult when they keep spawning right on me
had to set it to peacefull but I felt kinda cheap afterwards XD
In a constant amount of time, these are the items I've gotten.
34
84 [>>-i>] arrows
42
1 string