@Environment(value=CLIENT) public class CommandSuggestor extends Object
Modifier and Type | Class and Description |
---|---|
class |
CommandSuggestor.SuggestionWindow |
Modifier and Type | Field and Description |
---|---|
private static Pattern |
BACKSLASH_S_PATTERN |
private boolean |
chatScreenSized |
private MinecraftClient |
client |
private int |
color |
private boolean |
completingSuggestions |
private static Style |
field_25885 |
private static Style |
field_25886 |
private static List<Style> |
field_25887 |
private int |
inWindowIndexOffset |
private int |
maxSuggestionSize |
private List<OrderedText> |
messages |
private Screen |
owner |
private com.mojang.brigadier.ParseResults<CommandSource> |
parse |
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> |
pendingSuggestions |
private boolean |
slashOptional |
private boolean |
suggestingWhenEmpty |
private TextFieldWidget |
textField |
private TextRenderer |
textRenderer |
private int |
width |
private CommandSuggestor.SuggestionWindow |
window |
private boolean |
windowActive |
private int |
x |
Constructor and Description |
---|
CommandSuggestor(MinecraftClient client,
Screen owner,
TextFieldWidget textField,
TextRenderer textRenderer,
boolean slashRequired,
boolean suggestingWhenEmpty,
int inWindowIndexOffset,
int maxSuggestionSize,
boolean chatScreenSized,
int color) |
Modifier and Type | Method and Description |
---|---|
private static int |
getLastPlayerNameStart(String input) |
private static String |
getSuggestionSuffix(String original,
String suggestion) |
private static OrderedText |
highlight(com.mojang.brigadier.ParseResults<CommandSource> parse,
String original,
int firstCharacterIndex) |
boolean |
keyPressed(int keyCode,
int scanCode,
int modifiers) |
String |
method_23958() |
private List<com.mojang.brigadier.suggestion.Suggestion> |
method_30104(com.mojang.brigadier.suggestion.Suggestions suggestions) |
private static OrderedText |
method_30505(com.mojang.brigadier.exceptions.CommandSyntaxException commandSyntaxException) |
boolean |
mouseClicked(double mouseX,
double mouseY,
int button) |
boolean |
mouseScrolled(double amount) |
private OrderedText |
provideRenderText(String original,
int firstCharacterIndex) |
void |
refresh() |
void |
render(MatrixStack matrixStack,
int int2,
int int3) |
void |
setWindowActive(boolean windowActive) |
private void |
show() |
void |
showSuggestions(boolean narrateFirstSuggestion) |
private void |
showUsages(Formatting formatting) |
private static final Pattern BACKSLASH_S_PATTERN
private static final Style field_25885
private static final Style field_25886
private final MinecraftClient client
private final Screen owner
private final TextFieldWidget textField
private final TextRenderer textRenderer
private final boolean slashOptional
private final boolean suggestingWhenEmpty
private final int inWindowIndexOffset
private final int maxSuggestionSize
private final boolean chatScreenSized
private final int color
private final List<OrderedText> messages
private int x
private int width
private com.mojang.brigadier.ParseResults<CommandSource> parse
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions> pendingSuggestions
private CommandSuggestor.SuggestionWindow window
private boolean windowActive
private boolean completingSuggestions
public CommandSuggestor(MinecraftClient client, Screen owner, TextFieldWidget textField, TextRenderer textRenderer, boolean slashRequired, boolean suggestingWhenEmpty, int inWindowIndexOffset, int maxSuggestionSize, boolean chatScreenSized, int color)
public void setWindowActive(boolean windowActive)
public boolean keyPressed(int keyCode, int scanCode, int modifiers)
public boolean mouseScrolled(double amount)
public boolean mouseClicked(double mouseX, double mouseY, int button)
public void showSuggestions(boolean narrateFirstSuggestion)
private List<com.mojang.brigadier.suggestion.Suggestion> method_30104(com.mojang.brigadier.suggestion.Suggestions suggestions)
public void refresh()
private static int getLastPlayerNameStart(String input)
private static OrderedText method_30505(com.mojang.brigadier.exceptions.CommandSyntaxException commandSyntaxException)
private void show()
private void showUsages(Formatting formatting)
private OrderedText provideRenderText(String original, int firstCharacterIndex)
@Nullable private static String getSuggestionSuffix(String original, String suggestion)
private static OrderedText highlight(com.mojang.brigadier.ParseResults<CommandSource> parse, String original, int firstCharacterIndex)
public void render(MatrixStack matrixStack, int int2, int int3)
public String method_23958()