mojira.dev
MC-296658

Block update schedule not preserved on chunk reload

The schedule of scheduled ticks is not accurately preserved when reloading their chunk.

The schedule of some scheduled ticks may be delayed 1 game tick relative to other scheduled ticks in the reloaded chunk.
(Or, some scheduled ticks may be executed 1 game tick earlier than others, haven’t figured out what exactly happens.)

This can mess up redstone circuits or other technical systems.

Steps to reproduce the issue

  1. Run command /tick freeze

  2. Within a single chunk, create the array of observers depicted in attachment observer-array.png as follows:

    1. Place the back row first, with observing side facing the camera.

    2. Place the left-most observer in the front row, with observing side facing the back row.

    3. Run command /tick step

    4. Place the next observer in the front row, observing the back row.

    5. Repeat steps (2c)–(2d) until all observers are placed in the front row, 1 game tick apart.

  3. Run command /tick rate 1

  4. Run command /tick unfreeze

  5. Observe that this creates a blinking pattern like so:
    Tick i+0: [x][x][-][-][-][-]
    Tick i+1: [-][x][x][-][-][-]
    Tick i+2: [-][-][x][x][-][-]
    Tick i+3: [-][-][-][x][x][-]
    Tick i+4: [-][-][-][-][x][x]
    Tick i+5: [x][-][-][-][-][x]
    Each front row observer is powered for two game ticks, but no two observers power on or off at the same time.

  6. Reload the chunk, either by traveling far away and returning, or saving the world and reopening it.

  7. Observe the blinking pattern created by the reloaded observers.

Expected result

Block update schedule unaffected by reloading chunk:

Tick i+0: [x][x][-][-][-][-]
Tick i+1: [-][x][x][-][-][-]
Tick i+2: [-][-][x][x][-][-]
Tick i+3: [-][-][-][x][x][-]
Tick i+4: [-][-][-][-][x][x]
Tick i+5: [x][-][-][-][-][x]

Each front row observer is powered for two game ticks, but no two observers power on or off at the same time.

Actual result

Block update schedule is changed to a variant of:

Tick i+0: [x][x][-][-][-][-]
Tick i+1: [x][x][-][-][-][-]
Tick i+2: [-][-][x][x][-][-]
Tick i+3: [-][-][x][x][-][-]
Tick i+4: [-][-][-][-][x][x]
Tick i+5: [-][-][-][-][x][x]

Each front row observer is powered for two game ticks, but observers power on and off in pairs.

1 game tick granularity is lost; ticks seems rescheduled at 2 game tick granularity.

Attachments

Comments 2

This happens regardless of orientation.

Nergalic

(Unassigned)

Confirmed

Platform

Normal

Block states, Redstone

1.21.5, 25w20a

Retrieved