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

/effect fails with durations larger than 107374182 seconds

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Resolution: Fixed
    • Affects Version/s: 1.16.100.50 Beta, 1.16.1
    • Fix Version/s: 1.16.200.52 Beta, 1.16.200
    • Labels:
      None
    • Confirmation Status:
      Confirmed
    • Platform:
      Windows 10 - PC
    • ADO:
      392371

      Description

      The bug

      Effects applied with a duration longer than 107374182 seconds simply fail for no reason. This is probably because translating it to ticks ends up just below the integer size limit, and an increase of one overflows and makes the value negative.

      How to reproduce

      1. /effect @a speed 107374182
        It works
      2. /effect @a clear
      3. /effect @a speed 107374183
        FOV briefly changes but the effect is not applied

      Expected behavior

      Maximum effect duration should probably be 1000000 per Java Edition. But regardless of the chosen limit, all legal values should function properly.

        Attachments

          Activity

            People

            Reporter:
            tryashtar [Mod] tryashtar
            Votes:
            2 Vote for this issue
            Watchers:
            1 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved:
              CHK: