When aiming at a block and tab-completing the playsound command, the first coordinate of that block is skipped.
Linked issues
is duplicated by 1
Attachments
Comments 4
Please link to this comment in the description
The following is based on decompiled version of Minecraft 1.9 using MCP 9.24 beta. All method and class names are the names used in the decompiled version.
The reason why this happens it because the net.minecraft.command.CommandPlaySound.getTabCompletionOptions(MinecraftServer, ICommandSender, String[], BlockPos)
method uses the wrong index for the block coordinates. It uses 2 instead of 3.
public List<String> getTabCompletionOptions(MinecraftServer server, ICommandSender sender, String[] args, BlockPos pos)
{
// Replaced this
//return args.length == 1 ? getListOfStringsMatchingLastWord(args, SoundEvent.soundEventRegistry.getKeys()) : (args.length == 2 ? getListOfStringsMatchingLastWord(args, SoundCategory.func_187949_b()) : (args.length == 3 ? getListOfStringsMatchingLastWord(args, server.getAllUsernames()) : (args.length > 3 && args.length <= 6 ? func_175771_a(args, 2, pos) : Collections.<String>emptyList())));
return args.length == 1 ? getListOfStringsMatchingLastWord(args, SoundEvent.soundEventRegistry.getKeys()) : (args.length == 2 ? getListOfStringsMatchingLastWord(args, SoundCategory.func_187949_b()) : (args.length == 3 ? getListOfStringsMatchingLastWord(args, server.getAllUsernames()) : (args.length > 3 && args.length <= 6 ? func_175771_a(args, 3, pos) : Collections.<String>emptyList())));
}
confirmed