Page 1 of 2
monster spawner question
Posted: Thu Dec 15, 2011 8:01 am
by XsyntaXerrorX
I am not understanding
"A monster spawner is only active when a player is within 16 blocks of it." as it is written on Minecraft Wiki.
Could someone enswer me the question below please?

Re: monster spawner question
Posted: Thu Dec 15, 2011 10:10 am
by soppy
I believe im correct in saying the slope is the opposite direction.
For every block you go above the spawner you need to move one block closer towards it so you would end up with a spherical pattern with spawner in the middle
Re: monster spawner question
Posted: Thu Dec 15, 2011 10:14 am
by kingofturves
I believe the answer is related to Chunks so the vertical axis isn't important. Chunk sizes are 16X16.
If this is correct you can be any height away aslong as horizontally you would be within 16 blocks from the spawner block. I could be wrong.
Re: monster spawner question
Posted: Thu Dec 15, 2011 10:41 am
by XsyntaXerrorX
soppy wrote:I believe im correct in saying the slope is the opposite direction.
For every block you go above the spawner you need to move one block closer towards it so you would end up with a spherical pattern with spawner in the middle
so... u are saying its more like this:
with the red block being the spawner and the black blocks are the furthest blocks that are still "within" the active zone?
Thats then very different than normal mob spawning. Minecraft Wiki says:
Mobs spawn naturally within a 15x15 chunk (240x240 block) area around the player
Of course these two principles may not be related but its curios that it is so unclear.
Basically my question seems to be whether the "zone" is spherical or cubic... google wont tell me...
Re: monster spawner question
Posted: Thu Dec 15, 2011 10:48 am
by FaeynHeart
My guess is it is cubic.
You'd probably have to look at the code though..
I don't think vertical distance matters at all.
Re: monster spawner question
Posted: Thu Dec 15, 2011 10:58 am
by FlannyFlan
FaeynHeart wrote:My guess is it is cubic.
You'd probably have to look at the code though..
I don't think vertical distance matters at all.
Lies. Vert distance does make a difference.. My spawners only work after decending into the area that we made for them.. it is possibly 16 blocks also..
Re: monster spawner question
Posted: Thu Dec 15, 2011 11:01 am
by FaeynHeart
FlannyFlan wrote:FaeynHeart wrote:My guess is it is cubic.
You'd probably have to look at the code though..
I don't think vertical distance matters at all.
Lies. Vert distance does make a difference.. My spawners only work after decending into the area that we made for them.. it is possibly 16 blocks also..
That's why I used the words "guess" and "think". In short, they are not "lies" as they are specific to how I proposed the system "might" work.
Re: monster spawner question
Posted: Thu Dec 15, 2011 11:04 am
by soppy
Lighting works in the spherical pattern as shown in your second picture syntax, i presume this is the same for spawners.
Re: monster spawner question
Posted: Thu Dec 15, 2011 11:14 am
by XsyntaXerrorX
now now lets all be cordial with each other.
If its "cubic" then the "O" block is wthin (see 1st post)
If its "spheric" then the furthest block within the zone would be "J" per my assessment.
This is important so that one can build outwards in all direction using the maximum space allowed. I want to be able to craft and brew and whatnot without halting the spawning process.
Also in the event that u have 2 spawners within 30 blocks of eachother the zone question becomes even more important since if u want to use the 2 in combination with one "drop" point, u would want to know the exact parameters and how they translate into the 3 dimensional block-grid system.
Re: monster spawner question
Posted: Thu Dec 15, 2011 11:44 am
by FaeynHeart
public boolean anyPlayerInRange()
{
return worldObj.getClosestPlayer((double)xCoord + 0.5D, (double)yCoord + 0.5D, (double)zCoord + 0.5D, 16D) != null;
}
Done by coordinates it seems. They are type casted as doubles. They are not integers / blocks. However, blocks can be used as a measurement, it seems that coordinates would be a better term.
EDIT: So Flanny is correct that vertical distance is important to consider. So, you need to consider 3D planes, as the sum of distances must be 16 or under.