mojira.dev
MC-22586

spreadplayers command doesn't accept relative coords for x and z parameters

Entering the spreadplayers command with relative (~) x and/or z coords causes a "NaN is not a valid number" error.

Ex:
/spreadplayers ~0 ~0 10 20 false @a

This would be very useful for modular design, allowing players to be spread out relative to a given player/command block location, without being tied to a specific x/z location.

Linked issues

Attachments

Comments 16

Not sure if this is a bug report or a feature suggestions. If it is a suggestion, please use the forums.

It's both, depending on how you look at it. Strictly speaking, it's a bug because entering the above command gives an error which was clearly not accounted for (NaN error). Beyond that, it can also be a feature request, but that's a matter of intent, and I can't speak to the intent since there really isn't any documentation to say for sure! 😉

I would deem this a bug for the error message it returns, too. I was attempting to use this with Minecart with Command Blocks in Snapshot 13w39b, but it kept giving me the error you stated. I was trying to figure out if I was formatting it wrong or if it was the non-working relative coordinates. If not making the command use relative coordinates, the message it returns for trying needs to be fixed.

Also, still occurs in Minecraft 13w39b.

Is this still a concern in the current Minecraft version 1.7.2 / Launcher version 1.3.4 or later? If so, please update the affected versions in order to best aid Mojang ensuring bugs are still valid in the latest releases/pre-releases.

Still occurs all the way to the current Snapshot 14w02c.

6 more comments

Hi,
Still having this issue in 14w21b :
/spreadplayers ~ ~ 10 11 false @a => 'NaN' is not a valid number
Thanks for the fix
Korko

@Blah cannot confirm that

tested it yesterday on a vanilla server 27b. Works for me...

Berg

michael

Community Consensus

command, spreadplayers

Minecraft 1.6.1, Minecraft 1.6.2, Minecraft 1.7.4, Minecraft 14w02c, Minecraft 14w07a, ..., Minecraft 1.7.9, Minecraft 14w17a, Minecraft 14w21b, Minecraft 14w25a, Minecraft 14w25b

Minecraft 14w26a

Retrieved