Mob spawners miss a row on X and Z axis for the spawn range
I manipulated NBT data a bit to spawn anvils with mob spawners. Problem is they always miss one row on X and Z axis.
As english isn't my native language I made a video showing the issue. It's to large to upload as attachment, so here's a link: https://vimeo.com/55709238
Also I try to explain: Let's say the spawner is at x 6 and z 6. spawn range is 5. The expected output is to add 5 to all sides, so spawn from 0 to 11 on x and z (5 + 1 (the mob spawner) + 5). The given result is 5 + 1 + 4, so from 0 to 10.
BTW: This happens with all entities, anvils are just good to show it. This note is important as it says that this happens with vanilla gameplay, too.
Created Issue:
Mob spawners miss a row on X and Z axis for the spawn range.
I manipulated NBT data a bit to spawn anvils with mob spawners. Problem is they always miss one row on X and Z axis.
As english isn't my native language I made a video showing the issue. It's to large to upload as attachment, so here's a link: https://vimeo.com/55709238
Also I try to explain: Let's say the spawner is at x 6 and z 6. spawn range is 5. The expected output is to add 5 to all sides, so spawn from 0 to 11 on x and z (5 + 1 (the mob spawner) + 5). The given result is 5 + 1 + 4, so from 0 to 10.
BTW: This happens with all entities, anvils are just good to show it.
I manipulated NBT data a bit to spawn anvils with mob spawners. Problem is they always miss one row on X and Z axis.
As english isn't my native language I made a video showing the issue. It's to large to upload as attachment, so here's a link: https://vimeo.com/55709238
Also I try to explain: Let's say the spawner is at x 6 and z 6. spawn range is 5. The expected output is to add 5 to all sides, so spawn from 0 to 11 on x and z (5 + 1 (the mob spawner) + 5). The given result is 5 + 1 + 4, so from 0 to 10.
BTW: This happens with all entities, anvils are just good to show it. This note is important as it says that this happens with vanilla gameplay, too.
is duplicated by
relates to
Mob spawners miss a row on X and Z axis for the spawn range.
relates to
This ticket has been marked as a duplicate of MC-4855 , in favor of the better description/information provided.
In versions prior to 14w26c, mob spawners would check for the target mob in a cuboid with X and Z lengths 4*SpawnRange+1. For example, a spawner with default settings (SpawnRange = 4) would stop spawning when there are more than 6 of the target entity in a 17x9x17 area around the spawner. In 14w26c, this has changed to 2*SpawnRange+1, i.e. it now checks a 9x9x9 area around a spawner with default range.
It may be this change in behavior was intended, but as it wasn't announced or part of MC-4855 I'll report it. The change certainly would make spawner-based mob farms easier.
Possible fix
(Using MCP naming)
... if (var13 != null) { var5 = (double) this.xCoord + (this.worldObj.rand.nextDouble() - this.worldObj.rand.nextDouble()) * (double) this.spawnRange; var5 += 0.5; // FIX, feel free to combine into the previous line double var7 = (double) (this.yCoord + this.worldObj.rand.nextInt(3) - 1); double var9 = (double) this.zCoord + (this.worldObj.rand.nextDouble() - this.worldObj.rand.nextDouble()) * (double) this.spawnRange; var9 += 0.5; // FIX, feel free to combine into the previous line ...I did not test these changes, but it looks quite obvious.
Well hello there bug. You've been around a while.
This is still in the game as of the latest Minecraft version. SpawnRange doubles.
SpawnRange:1 checks 2 blocks outward from the spawner.
SpawnRange:2 checks 4 blocks outward from the spawner.
SpawnRange:3 checks 6 blocks outward from the spawner, etc.
Confirmed in 13w21b.
Is this still a concern in the latest Minecraft version 14w05b? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.
ya it's still around