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

/random roll|value only support ranges up to 2^31-2

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Invalid
    • None
    • 1.20.3 Release Candidate 1
    • None
    • Unconfirmed
    • (Unassigned)

      The /random roll and /random value command fails when the range contains over 2147483646 (2^31-2) values.

      I know that this behavior is intended but implementing over 2^31-2 values only requires switching from Random.nextInt(int bound) to Random.nextLong(long bound) for bigger ranges.

            Unassigned Unassigned
            Rob23 Rob23
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved: