mojira.dev
MC-186963

Spreadplayers drops tps when used in an area with a lot of invalid blocks

Summary:

I know there was an issue with spreadplayers causing the server to drop to 3 ticks, but this issue is regarding the behavior where the server struggles when spreadplayers is used in an area with a little/no valid blocks to place players on (such as in an ocean). In my context, I am using this command to spread some entities apart semi-randomly to check for specific types of blocks, but when players cross into oceans, the server struggles.

 

To reproduce:

Use the spreadplayers command with a spread distance that encompasses only invalid blocks (water, lava, and I assume void)

 

Extra info:

I am assuming this is happening because it is attempting to find a valid block, then when it fails, it tries again. Though I don't know for sure if this is a bug or just a known side affect of intentional behavior.

 

Now at this point I have to admit that this is walking the line of bug report, and suggestion, but I assume a fix to this would be to add an argument which limits the check to one pass (or even a user defined amount). So in my example, it would only check once in open waters, then stop.

 

Sorry if this has already been reported, I could not find anything specifically related to this.

Comments 4

What is the exact command you used?

The command I am using to test this is "/spreadplayers ~ ~ 0 50 false @p", this is being run from a command block in the middle of the ocean, with nothing but water directly below the sky.

 

Edit: One quick thing to note, kelp stalks, when grown to the surface of the water, count as valid spots to place a player. So to reproduce this in the ocean correctly, make sure there is no kelp contacting the surface of the water in the area the /spreadplayers command is checking.

It also happens randomly with too many entities:

summon 50 armor stand, and the run

/spreadplayers ~4.5 ~4.5 1 4.5 false @e[type=minecraft:armor_stand]

half the time the game freeze (server and sometimes client) (and every time with more than 100 armor stand)

Can confirm in 1.19.3

Jacob White

(Unassigned)

Confirmed

Commands, Performance

command, lag

1.15.2, 1.19.3, 24w39a

Retrieved