Mojira Archive
MC-183528

Big count in /particle command makes client freeze

The bug

When putting a huge amount of particle using the command /particle, the client freeze.

How to reproduce?

On singleplayer or multiplayer, type this command :

/particle minecraft:cloud ~ ~ ~ 0 0 0 1 10000000 force

On multiplayer, the server will continue to run normally. Only the clients that have to display the particles are freezing.

Possible fixes

Command argument

The argument <count> of the command /particle should have a maximum value:

IntegerArgumentType.integer(0, 16384)

Protocol

The Particle packet should have the Particle Count field with a type with lower byte count (Short instead of Int)

Client implementation

Something like this could be implement when receiving the Particle packet, before rendering:

count = Math.min(count, MAX_PARTICLE)

MAX_PARTICLE being the maximum number of particle being displayed simultaneously on the client (currently around 16000)

Unresolved

Marc Baloup

2020-05-11, 08:58 PM

2024-04-07, 07:36 AM

4

3

Confirmed

Normal

Platform

Particles, Performance

1.15.2 - 24w14a1.15.2, 20w19a, 23w43b, 1.20.4, 24w13a, 24w14a

-