mojira.dev
MC-296157

Server Lag When Using Multiple Command Blocks in a Chain

When multiple command blocks are set up in a chain on a server, significant lag occurs, especially when these blocks are executing commands rapidly. The lag causes delays in block updates, player movement, and overall world interaction, making the server feel unresponsive.


Steps to Reproduce:

  1. On a server, set up a series of command blocks in a chain, where each command block executes a command rapidly (e.g., giving items, teleporting players, changing block states).

  2. Ensure the command blocks are set to repeat or have a high-frequency execution rate (e.g., every tick or short time interval).

  3. Activate the chain of command blocks using a redstone signal or other triggers.

  4. Observe the server’s performance, noticing lag spikes, delayed actions, and issues with player movement or block updates.


Expected Result:

The command blocks should execute normally, with no noticeable performance impact on the server or player interactions.


Observed Result:

When multiple command blocks are triggered in a chain, the server experiences significant lag, resulting in delayed commands, slow block updates, and stuttery player movement.


Notes:

  • This issue seems to worsen when command blocks are executing complex or resource-intensive commands (e.g., large entity spawns or block changes).

  • The lag is especially noticeable when the server has multiple players online.

  • The lag is minimized when only a small number of command blocks are used, but it increases with larger chains.

Comments 1

Are you able to attach a structure.nbt or a world that can be used to reproduce the issue more easily?

Ghrobulamsmonmouthuwu

(Unassigned)

Unconfirmed

(Unassigned)

1.21.5

Retrieved