It seems like this affects every command. If you enter arguments behind the tab completion and then press TAB, it fails when there are multiple possibilities
When you enter the beginning of a particle name, have the other values set and press TAB, it will only complete the name, if there is only one particle name with this start. I expected rather that it would cycle trough all the names like the game does for every other command.
How to reproduce:
Enter the code and press TAB ([CURSOR]
shows the position where the mouse cursor should be)
/particle command completion works
/particle snows[CURSOR] ~ ~ ~ 1 1 1 10
/particle command completion fails
/particle snow[CURSOR] ~ ~ ~ 1 1 1 10
The reason
The reason for this seems to be that the onAutocompleteResponse(String[] p_146406_1_)
method of the net.minecraft.client.gui.GuiChat
class (MCP 1.8 names) does not remove anything after the next space when trying to complete. This means that the prefixes are identically but because one has the rest of the command behind it, the command pieces are treated as if the were not identically. This causes the common prefix "snow" to be replaced again with "snow".
public void onAutocompleteResponse(String[] p_146406_1_)
{
if (this.waitingOnAutocomplete)
{
//...
//Changed this
//String var6 = this.inputField.getText().substring(this.inputField.func_146197_a(-1, this.inputField.getCursorPosition(), false));
String stringToComplete = this.inputField.getText().substring(this.inputField.func_146197_a(-1, this.inputField.getCursorPosition(), false));
int nextSpace = stringToComplete.indexOf(" ");
if (nextSpace == -1) nextSpace = stringToComplete.length();
String var6 = stringToComplete.substring(0, nextSpace);
//...
}
}
Linked issues
is duplicated by 1
Comments 7
Do you have the other arguments set?
I know that it works when you start with /particle snow
, but it won't work with /particle snow[CURSOR] ~ ~ ~ 1 1 1 10
Can't replicate. No such particle as "snows" or "snow". TAB cycles all particles listed.