[MC-4855] Mob spawners miss a row on X and Z axis for the spawn range Created: 17/Dec/12 Updated: 22/Jan/22 Resolved: 26/Jun/14 |
|
| Status: | Resolved |
| Project: | Minecraft: Java Edition |
| Component/s: | None |
| Affects Version/s: | Minecraft 1.4.5, Minecraft 1.5.1, Minecraft 1.5.2, Snapshot 13w19a, Snapshot 13w21a, Snapshot 13w21b, Minecraft 1.7.9, Minecraft 14w20b, Minecraft 14w21a, Minecraft 14w21b |
| Fix Version/s: | Minecraft 14w26c |
| Type: | Bug | ||
| Reporter: | Thomas Rohloff | Assignee: | Mog (Ryan Holtz) |
| Resolution: | Fixed | Votes: | 4 |
| Labels: | mobSpawner | ||
| Issue Links: |
|
||||||||||||||||||||
| CHK: | |||||||||||||||||||||
| Confirmation Status: | Confirmed | ||||||||||||||||||||
| Description |
|
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. |
| Comments |
| Comment by TrazLander [ 27/May/14 ] |
|
ya it's still around |
| Comment by [Mod] Ezekiel (ezfe) [ 03/Feb/14 ] |
|
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. |
| Comment by Anon Ymus [ 27/May/13 ] |
|
Confirmed in 13w21b. |
| Comment by TrazLander [ 27/May/13 ] |
|
Well hello there bug. You've been around a while. This is still in the game as of the latest Minecraft version. SpawnRange doubles. |
| Comment by Markku [ 20/Feb/13 ] |
|
Possible fix TileEntityMobSpawner.updateEntity() ...
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. |