mojira.dev
MC-68415

Spreadplayers doesn't work correctly

The command /spreadplayers seems to not work properly.
Trying to use this command: "spreadplayers 39 246 5 8 false @e[type=Bat,name=Waves]", the bat should be randomly teleported in a block at least 5 and at most 8 blocks away from the center. Instead, the bat doesn't moves and a strange error message appears: "Could not spread 1 players around 39.5,246.5 (too many players for space - try using spread of at most 340282..." and a lot of other digits.

Doesn't work either with larger radius, the only difference is that the entity is teleported in other places, but only in certain areas, not in the entire radius.

Comments 6

Also, spreadplayer at one time would select ocean spawn but not in the 1.8 snapshots. Maybe ocean can be added back as an option?

Is this still a concern in the current Minecraft version? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases. If this has been done, we can reopen the issue.

Keep in mind that the "Resolved"-Status on this ticket just means "Answered", and that we are waiting for further information on whether this issue still exists or not. We will reopen it as soon as the requested information has been delivered.

I've confirmed this in 15w47c, and it should be reproducible. I've tested the following using the server console on linux and in singleplayer in Windows:

Create world, seed -1734841898848559871

/summon Pig 152 250 252 {CustomName:Bob,CustomNameVisible:1,NoAI:1,PersistenceRequired:1}
[21:37:15] [Server thread/INFO]: Object successfully summoned

/spreadplayers -200 -168 0 1 false @e[name=Bob]
[21:10:26] [Server thread/INFO]: Spreading 1 players 1.0 blocks around -199.5,-167.5 (min 0.0 blocks apart)
[21:10:26] [Server thread/INFO]: Successfully spread 1 players around -199.5,-167.5

/spreadplayers -200 -152 0 1 false @e[name=Bob]
[21:10:36] [Server thread/INFO]: Spreading 1 players 1.0 blocks around -199.5,-151.5 (min 0.0 blocks apart)
[21:10:36] [Server thread/INFO]: Could not spread 1 players around -199.5,-151.5 (too many players for space - try using spread of at most 340282346638528860000000000000000000000.00)

Initially I discovered this when using spreadplayers to move an entity to a chunk that was yet to be loaded; but it appears this behaviour is the same even if the chunks are loaded.

OK, I admit to blindly typing commands. I checked the area out, and it's deep water. So this is probably expected behaviour, though a more useful error message would be nice.

Pmk

(Unassigned)

Community Consensus

Minecraft 14w34d, Minecraft 15w47c

Retrieved