Sheep groups spawning at world generation or otherwise when structures are generated at the same time will spawn the same sheep colors.
Steps to reproduce:
Find a world where a lot of sheep spawn at world generation. Ideally spawn near a plains biome. Example seeds are "136" and "quarry" (default biomes)
Observe sheep
Actual results:
The sheep spawning in groups of 4 always spawn with the same color. In the "quarry" seed, sheep will always spawn as three white sheep and one brown sheep. In the "136" seed, sheep will always spawn as three white sheep and one dark grey sheep.
Expected result:
Sheep should be randomized so you get different sheep per group per world.
The code that generates groups of sheep (and possibly other mobs) doesn't seem to use the random generator properly so all the sheep groups are generated the same. See comments for details and attachments for debug output.
Note: This bug probably applies only to mobs spawning while structures are generated at the same time, if you search long enough, you may/will find different sheep groups.
PS: Additionally, some seeds like "135" spawn huge amounts of pigs but no sheep, so it may be possible that the random generator fails to be random even earlier: At determining which mobs to spawn.
Code analysis
See this comment by @unknown
Linked issues
is duplicated by 8
Attachments
Comments 38
Yes, I know, but try to calculate the probablity of of 6 sheep groups with each 1 pink sheep and 3 brown sheep in it. (In plains biome)
I'm no expert in statistics, but the probablity for that is extremely low, around 1×10^-50, so I'm pretty sure this is an issue in the game. At least the devs should take a look at the code.
Are you saying that the issue is that supposedly rare sheep (brown and pink) are spawning a bit too frequently? I don't really understand the issue from the description.
Random is random. The probability for a pink sheep to spawn is always 0.164%, regardless how many pink sheep are running around yet.
(Question: How is the probability to roll a dice to "6" when you draw the last three rolls also "6" ?)
Just a quick example: generate a new world with seed "quarry" in creative mode. Go/Fly to the plains biome x=0, z=190, observe sheep groups. All groups consist of 1 brown sheep and 3 white ones. This is just a completely random seed I use and is not specially choosen to spawn exactly these sheep.
If I find a way/screenshot to reprocude the pink sheeps, I will post it here, but this should do for now.
I'm not too familiar with this bug, but I just found a pack of four white sheep in the "136" seed. Does that mean it's fixed?
White is too common color, so that can not be used to check this one. It is best to check the seeds and locations already mentioned, but also note that world generation changes can make the earlier seeds/locations to no longer give the same results.
The best indication is to find a group with sheep(s) of rarer color(s), and see if the same color distribution is found in other groups nearby. E.g. if multiple groups all have 3 whites and one black, it could be an indication of this bug still being in effect. Typically, one would first find a world with a nice amount of sheep groups close together, then recreate the world with the same seed, but teleport right in the middle of those sheep groups (so they get generated in the same generation "run"). But just flying around in creative might do the trick, too.
You don't have to find the sheep, just give them the glowing effect. I found one group with a dark grey sheep, like in the report, and another one without a grey sheep.
This report is currently missing crucial information. Please take a look at the other comments to find out what we are looking for.
If you added the required information and a moderator sees your comment, they will reopen and update the report. However, if you think your update to this report has been overlooked or you want to make sure that this report is reopened, you can contact the Mojira staff on Discord or Reddit.
-- I am a bot. This action was performed automatically! Please report any issues on Discord or Reddit
The spawning rates of the colours are not equally distributed:
According to http://www.minecraftwiki.net/wiki/Sheep the spawning rates are White Sheep 81.836%, Light Gray Sheep 5%, Gray Sheep 5%, Black Sheep 5%, Brown Sheep 3% (50% in extreme Hills biome), Pink Sheep 0.164%
For doing a real statistics a sample of 6 groups á 4 sheep is way too less.