Uploaded image for project: 'Minecraft (Bedrock codebase)'
  1. Minecraft (Bedrock codebase)
  2. MCPE-44604

1 character seeds generate randomly instead of using the input

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • 1.18.20.21 Beta, 1.18.30
    • 1.18.10.27 Beta, 1.17.40.21 Beta, 1.17.30.24 Beta, 1.17.11 Hotfix, 1.12.0.2 Beta, 1.11.0.10 Beta, 1.10.1 (Windows 10 only), 1.10.0, 1.12.0.4 Beta, 1.11.1, 1.11.2, 1.16.221 Hotfix, 1.17.0, 1.17.30, 1.18.2 Hotfix
    • Confirmed
    • Multiple
    • 536403

      When a 1 character seed (where the codepoint is less than U+0080) is entered into the seed box, and the world is generated, the world will instead use a new random seed each time. This is also still broken when a '-' character (minus sign) is inserted in front of the first character.

      I can confirm this bug exists for both the Windows 10 Edition (out of beta) and the Android version (in beta). I have not tested any other platforms, but I imagine the bug also exists on all of the platforms.

      Also note, both platforms were 64bit, so it may not be broken on 32bit machines, but my Windows 10 machine was x64 (intel), and my android device was 64bit ARM (exynos), so I find that unlikely as it seems to work on 2 different processors on 2 different platforms already.

      I have tested the following seeds (without quotation marks) on Windows 10 (out of beta) and they generated randomly (broken): "0", "1", "2", "3", "4", "5", "6", "7", "8", "9", "0", "-1", "-2", "-3", "-4", "-5", "-6", "-7", "-8", "-9", "a", "-a", TILDE, MINUS TILDE, (U+007F, looks like house character in game)

      I have tested the following seeds (without quotation marks) on Windows 10 (out of beta) and they didn't generate randomly (expected behaviour): "ab", "☺" (U+263A), "ÿ". (U+00FF), "ÿ" (U+002D U+00FF), MINUS MINUS ONE, "+1", (U+0080)

      I also tested the seed 1 on android (in the beta for 1.11) and it generated randomly.

      Since the cutoff point for the random seed appears to be U+0080, I imagine there is some accidentally incorrect conversions between unicode and ascii in the number parser for the seed box, as this is the ascii cutoff point, I find it interesting that it's also still broken with a minus sign in front of the other character.

      Here is an example with the seed "1" entered on Windows 10 (out of beta): Minecraft 2019-04-15 07-37-20.mp4

      The 1 character numerical seeds should generate a world with that seed, and the other 1 character seeds should be the same each time, that is the bug in its simplest form.

      I have also found some strings that generate into the 1 digit seeds to show they are not broken (doc). Here is a video showing this also. There are also some seeds on the document that generate these seeds from numbers (credit to here / here) which generate those seeds because of overflow (quite odd that they even count as numbers as they are too big to fit in a 32bit integer memory location!), also note that the seed -1 was strangely excluded from this list, as it seemed to generate randomly no matter what number was entered.

      How to reproduce

      1. Create a world with the seed "10"
      2. Check the seed ( It's 10)
      3. Create a world with the seed "5"
      3. Check the seed ( It's something random, and different every time, like -1687526163 or 636782418)

            hamarb123 Hamish Arblaster
            Votes:
            14 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              CHK: