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)
Linked issues
is duplicated by 1
Comments 11
The client could do simple thing like Math.min(count, 16384) before starting to render the particles.
And how would you determine what value can be chosen for which setup? A value that works for a high- or mid-end setup can still make a toaster freeze.
Actually the number of particle is already limited to a fixed value, client side. This is visible in F3 when you summon a lot of particle (spamming fireworks or command), this is always limited to a little more than 16000 (16384 in my previous comment was a guess)
I am reopening this ticket for Mojang to decide, since this causes the game to freeze and as such could be a valid issue.
Can someone confirm the particle limit rendered by the client is indeed 16k? And if its, could you please provide the precise value.
May relate to MC-76117.
Thank you for your report!
After consideration, the issue is being closed as Won't Fix.
Please note that this is not the same as Working as Intended, as this bug report correctly describes behavior in the game that might not be the intended or desirable behavior, but it will not be fixed right now. Sometimes, this is because the issue reported is minor and/or impossible to change without large architectural changes to the code base.
Quick Links:
π Bug Tracker Guidelines β π¬ Community Support β π§ Mojang Support (Technical Issues) β π§ Microsoft Support (Account Issues)
π Project Summary β βοΈ Feedback and Suggestions β π Game Wiki
This isn't really fixable. If you ask the client to render a massive number of complex moving particles, it's pretty much inevitable that you will start to run out memory and computing power.