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

/effect with large 'time' values produces inconsistent behaviour

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • None
    • Minecraft 1.12.2, Minecraft 17w45a
    • None
    • Windows 7
    • Unconfirmed

      /effect @p regeneration 999999 1 (for example) will give regeneration (level 2) indefinitely.

      BUT, if I already have the regeneration effect (level 1), and I input this command, the higher-level regen overrides it. This is expected behaviour, but what is unexpected is that the level 2 regen, instead of lasting indefinitely, lasts for about 27 minutes. (It's worth noting that this is much less than both 999999 seconds and 999999 ticks).

      So, either 999999 should always mean 'indefinite time', OR it should actually mean 999999 seconds (this is 11.5 IRL days) and 'indefinite time' should have a special value like -1.

      STEPS TO REPRODUCE (1.12.1)
      1. /effect @p regeneration 60 0
      2. /effect @p regeneration 999999 1

      STEPS TO REPRODUCE (17W45A)
      1. /effect give @p regeneration 60 0
      2. /effect give @p regeneration 999999 1

      EDIT: The 28-minute value it comes up with is about 1600 seconds. Inputting any time value higher than this produces identical results, so it must be some issue with handling numbers over 1600 seconds (I think because it sees that as about 32768 ticks, which is 2^15 and may cause a buffer overflow error? Or something? I don't know.)

      EDIT 2: So, apparently 999999 seconds only causes a problem with the display, not the actual timer - it still actually lasts for 999999 seconds. Fair enough, but the fact that it only gives you 27 minutes if you already have the lower-level effect is still a bug.

      EDIT 3: Bug also occurs in new 1.13 snapshot.

            Unassigned Unassigned
            misterblue28 misterblue28
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: