Uploaded image for project: 'Minecraft: Java Edition'
  1. Minecraft: Java Edition
  2. MC-2788

Sheep wool color doesn't generate/randomize properly; generating villages resets world RNG



    • Icon: Bug Bug
    • Resolution: Awaiting Response
    • None
    • Minecraft 1.4.2, Minecraft 1.4.4, Minecraft 1.4.6, Minecraft 1.4.7, Snapshot 13w02a, Snapshot 13w05b, Snapshot 13w06a, Snapshot 13w07a, Snapshot 13w09a, Snapshot 13w09b, Minecraft 1.5, Snapshot 13w11a, Minecraft 1.5.1, Minecraft 1.5.2, Snapshot 13w17a, Snapshot 13w18a, Snapshot 13w18b, Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 1.6.4, Minecraft 13w38c, Minecraft 13w42a, Minecraft 13w42b, Minecraft 13w43a, Minecraft 1.7, Minecraft 1.7.4, Minecraft 14w05b, Minecraft 14w06b, Minecraft 14w07a, Minecraft 14w08a, Minecraft 14w17a, Minecraft 14w19a, Minecraft 14w21b, Minecraft 1.8, Minecraft 1.8.1-pre3, Minecraft 15w41b, Minecraft 15w47b, Minecraft 1.9.4, Minecraft 1.10.2, Minecraft 1.11.2
    • Confirmed
    • World generation


      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 bugi74


        1. 2012-11-11_13.58.25.png
          1.41 MB
        2. 2012-11-11_14.14.17.png
          1.61 MB
        3. 2012-11-11_14.14.24.png
          1.31 MB
        4. 2012-11-11_14.14.39.png
          2.36 MB
        5. 2012-11-11_14.14.51.png
          1.78 MB
        6. 2012-11-11_14.15.11.png
          1.62 MB
        7. 2016-06-29_12.36.37.png
          2.55 MB
        8. random.txt
          2 kB
        9. sheep-console-spam.txt
          9 kB



            Unassigned Unassigned
            jonathanhaas Jonathan Haas
            18 Vote for this issue
            15 Start watching this issue