!!Edit: This was written when 1.6 was first released. The steps to reproduce were for that version. However, the situation still applies to nearly all biomes (non-variation of passive mob herds during "sequential" new chunk generation).
==========
I noticed plains biomes are spawning disproportionately large numbers of sheep groups. The amount of cows and horses seems to be "normal" as well as chickens, maybe, but pigs have become a rarity.
I've been creating and recreating worlds with my very first ever seed and noticed the pig problem the other day when I set off in search of them after my food bar got low. I went to a nearby plains area where pigs are known to frequent and found herd after herd of sheep. I thought it might just be a coincidence that only sheep had been spawning in the area surrounding the spawn point so I flew around and around in a wider circle and still, only herds of sheep were spawning - pigs are very rare.
What I expected to happen was...:
Herds of pigs spawn with their usual random weight.
What actually happened was...:
Mostly sheep spawn all over the place.
Steps to Reproduce (particular to my world seed):
1. Create a new world
2. Named it "World 1"
3. Set to "Creative"
4. Set seed to <5437694978402696571> (brackets excluded)
5. Set to "Large Biomes", Structures: ON, Cheats: ON
6. From the world spawn point, head south until you reach a large lake, then head east into the nearby plains biome. Here is where I found spawn after spawn of sheep. Even flying all over the plains biome nearly all the spawns were sheep.
See also: attached crash report listing mostly sheep and a few chickens
Additionally: when working with Minecraft MCP on a personal local mod I noticed the random number generator was rolling an unusually high count of the number 11 (which apparently coincides with sheep in the plains biome).
Attachments
Comments 7
The spawn generation is the same under the 32-bit version of Java (too many sheep).
The spawn generation is the same in v1.6.1 (too many sheep).
The spawn generation is "normal" in 1.5.2; though in the attached screenshots of sheep all are replaced by pigs and sheep spawn frequently in the forest surrounding the spawn point.
I've just found the issue has more to do with the random numbers being rolled than with the entries in the biome creatures list.
Could it be the method used for picking random numbers relies on an internal mechanism that doesn't change as fast as code can call it?
In 1.6.2 I saw a lot of rolls of 11 which resulted in picking sheep a majority of the time. In 1.5.2, which I assumed was normal, I see lots of rolls for 16 which results in picking pigs most of the time.
Maybe <Random>.nextInt() needs to be replaced with something else?
Anyway, that's my discovery. Don't think I'll be doing any more research on the issue. Maybe Mojang and their far more experienced Javanauts know of something trivial that will solve the problem. 🙂
This is actually still an ongoing issue in 1.7.x.
I was travelling long distance (> 10km) and encountered several animal herds of all the same type.
Horses, for instance, have a weight of 5 in the Plains biome (thus having a 5 in 45 chance of being selected, yes??). However, when travelling as mentioned all new chunks I encountered at the time spawned horses.
I'm certain the issue is related to the millisecond resolution available to java.util.Random to use as a seed. With my own modding, java.security.Random adequately randomized the process WeightedRandom uses to select a WeightedRandomItem when called (rather than the process that deals with terrain generation). Of course, using java.security.Random means recreating a world with the same seed would mean mob spawns would be entirely random every time, but I think that may be an improvement to having to travel many kilometers to find something other than sheep (considering mutton does not exist {yet?}).
I will try to find the crazy horse spawns and add a screenshot.
I was just thinking...
Could this be an issue relating to the use of the 64-bit version of Java? Would that affect a random number generator and cause the roll of a particular number to be unusually high?