Theorems on why 24/7 loop isn't possible

Here are some “possible” theorems that might suggest why we can’t make a 24/7 loop

  1. 30

There is a questionable point where if a loop executes for 30 times, it would stop.

Originally, it was mistaken of 30 seconds after the final player had left the world.

The proof for this was when executes a loop with a rate speed of 5 ticks, increases the X value by 1, go back and leave and lets the loop run for a while, join back and we will see X stop at 30 (+/-1)

20 ticks in Minecraft equals 1 second thus the loop only executed for 7.5 seconds. Which weren’t 30 seconds like anticipated.

  1. Length

The length of the loop/function might also be a possibility. This time we will be using a loop instead of a function. By Increasing X in a function with 20+ waits alternately we will get a different result.

For example, a F(a) with a string of increase and wait according to the 30 rule it should be stopped at 600 right (600 because 30 * 20; 20 = 40 / 2 (40 is the maximum inputs in a single code line). But in reality, it doesn’t! wait doesn’t work if the world is offline. So this theorem is obviously inaccurate.

  1. Inconsistency

When I refer to inconsistency, I meant how sometimes code just doesn’t work like how it intended to. Sometimes the 30 rule doesn’t apply to all the sceneries.

Inconsistency might be caused by TPS, server performance, the functions of the code, or an external interaction.

  1. Entity

There is a theory suggested that entity can help (trick) the code into thinking the world is online but obviously this doesn’t work either.

  1. Interactions

A part of a plugin might have involved in this and stopping the loop to prevent server lags.

  1. /build

In November 2022, deefer suggested that 24/7 loop isn’t possible because after the 30 rule, the world’s gamemode would be turned back to /build thus causing all the actions to stop.

1 Like