mojira.dev
MC-313842

Very high timeline repetition counts become negative

The Bug:

Very high timeline repetition counts become negative.

Please avoid reproducing this issue if you have photosensitive epilepsy as your screen will flash a lot within a quick time.

Steps to Reproduce:

  1. Place down a repeating command block, set it to "Always Active", and paste the following command into it.

    /time add 2147483647
  2. Make the game run 30,000 ticks as fast as it can by using the command provided below.

    /tick sprint 30000
  3. Once the sprint is completed, break the repeating command block.

  4. Check how many days have passed by using the command provided below.

    /time query minecraft:day repetition
  5. Observe if the number of days shown is a positive number.

Observed Behavior:

Very high timeline repetition counts become negative.

Expected Behavior:

Very high timeline repetition counts would stay positive.

Attachments

Comments 2

Confirmed in 26.4 Release Candidate 1. The repetition count of minecraft:day overflows and becomes negative once it exceeds the 32-bit signed integer limit (2,147,483,647), wrapping around to -2,147,483,648.

Avoma

(Unassigned)

Unconfirmed

26.3, 26.4 Release Candidate 1

Retrieved