-
Bug
-
Resolution: Unresolved
-
None
-
1.20.2, 23w41a
-
None
-
Plausible
-
Performance
-
Normal
-
Platform
If you schedule a lot of Block events (Pistons and noteblocks) in unloaded chunks, the minecraft server iterates over a list, then creates a new one with unprocessed blocks and after that it dumps it into another list, this juggling betwen lists creates a lot of lag, specially if the list is big.
The code I'm referring to is the next, although the mappings might not be the oficial Minecraft ones:

Using an iterator migh be better I think, if a world showing this is needed i migh be able to provide that in the future, from what ive tested 100k updates on mid hardware reduce the tps to less than 10