mojira.dev
MC-26608

/spreadplayers confirmation text is wrong

The help text says the the syntax is <x of orgin> <z or origin> <distance between players> <distance from origin> . . . The affect (or at least the message sent) seems to suggest that the syntax is really <distance from origin> <x of origin> <y of origin> <distance between players> . . .

example: I typed /spreadplayers 0 0 400 1000 true @a
I expected this to spread all players (teams respected) at most 1000 blocks from the point 0,0 with 400 blocks between each team.
The result text says that command spread the teams 0.5 blocks from the point 0,400, with 1000 blocks between each team

Attachments

Comments 2

No, the usage text is correct, but the order and type of variables in the confirmation string ( Spreading %s players %s blocks around %s,%s (min %s blocks apart)) is messed up:

Old CommandSpreadPlayers.processCommand()

par1ICommandSender.sendChatToPlayer(ChatMessageComponent.func_111082_b(
    "commands.spreadplayers.spreading." + (respectTeams ? "teams" : "players"), 
    new Object[] {func_110663_b(players), Double.valueOf(x), Double.valueOf(y), Double.valueOf(distance), Double.valueOf(maxRange)}));

Fixed CommandSpreadPlayers.processCommand()

par1ICommandSender.sendChatToPlayer(ChatMessageComponent.func_111082_b(
     "commands.spreadplayers.spreading." + (respectTeams ? "teams" : "players"), 
     new Object[] {players.size(), Double.valueOf(maxRange), Double.valueOf(x), Double.valueOf(y), Double.valueOf(distance) }));
  • Variable names are a mixture of mcp and my own naming

(Attached screenshot after fix)

Max Hadson

migrated

Confirmed

Minecraft 1.6.2

Minecraft 13w36a

Retrieved