mojira.dev
MC-50546

Spreadplayers not consistently working

When running the same spreadplayers command under the same conditions, it will only succeed some of the time.

Steps to replicate:
1. Summon 12 chickens (the number of chickens is important as it seems correlated with the bug): /summon Chicken -7 56 6 {Invulnerable:1,Attributes:[{Name:generic.movementSpeed,Base:0}]}

2. Set up a spreadplayers commandblock with a spread distance of 2 and a max radius of 3: /spreadplayers -20 -9 2 3 false @e[type=Chicken]

3. Trigger the command block numerous times. It seems to work about 1 in 5 times. Shouldn't it work every single time?

Linked issues

Attachments

Comments 3

I can confirm this in 1.8.1. Attempt this command "/spreadplayers 0 0 1 2 false @e" with 16 entities. It will only work intermittently. Whether it works or not seems to be based on whether the entities are in the area they are supposed to be spread into, but I haven't completely figured out what causes this yet.

This is probably related to MC-50548.

Pretty sure this is the same issue as MC-50548. The game probably starts placing the entities randomly such that they are sufficiently far and eventually the take up enough area that it isn't possible to find a location for the next one. Having more entities certainly will make it less likely to succeed.

magib1

(Unassigned)

Unconfirmed

Minecraft 14w10c, Minecraft 14w18a, Minecraft 1.8.1

Retrieved