net.minecraft.client.gui.screen

public class ChatInputSuggestor

net.minecraft.client.gui.components.CommandSuggestions
net.minecraft.class_4717
net.minecraft.client.gui.screen.ChatInputSuggestor

Field summary

Modifier and TypeField
private static final Pattern
WHITESPACE_PATTERN
field_21596
WHITESPACE_PATTERN
private static final Style
UNPARSED_STYLE
field_25885
ERROR_STYLE
private static final Style
LITERAL_STYLE
field_25886
INFO_STYLE
private static final List<Style>
ARGUMENT_STYLES
field_25887
HIGHLIGHT_STYLES
private final MinecraftClient
minecraft
field_21597
client
private final Screen
screen
field_21598
owner
private final TextFieldWidget
input
field_21599
textField
private final TextRenderer
font
field_21600
textRenderer
private final boolean
commandsOnly
field_21601
slashOptional
private final boolean
onlyShowIfCursorPastError
field_21602
suggestingWhenEmpty
private final int
lineStartOffset
field_21603
inWindowIndexOffset
private final int
suggestionLineLimit
field_21604
maxSuggestionSize
private final boolean
anchorToBottom
field_21605
chatScreenSized
private final int
fillColor
field_21606
color
private final List<OrderedText>
commandUsage
field_21607
messages
private int
commandUsagePosition
field_21608
x
private int
commandUsageWidth
field_21609
width
private com.mojang.brigadier.ParseResults<ClientCommandSource>
currentParse
field_21610
parse
private CompletableFuture<com.mojang.brigadier.suggestion.Suggestions>
pendingSuggestions
field_21611
pendingSuggestions
private ChatInputSuggestor$SuggestionWindow
suggestions
field_21612
window
private boolean
allowSuggestions
field_21613
windowActive
private boolean
keepSuggestions
field_21614
completingSuggestions
private boolean
allowHiding
field_46191
canLeave

Constructor summary

ModifierConstructor
public (MinecraftClient client, Screen owner, TextFieldWidget textField, TextRenderer textRenderer, boolean slashOptional, boolean suggestingWhenEmpty, int inWindowIndexOffset, int maxSuggestionSize, boolean chatScreenSized, int color)

Method summary

Modifier and TypeMethod
public void
setAllowSuggestions(boolean allowSuggestions)
method_23933(boolean arg0)
setWindowActive(boolean windowActive)
public void
setAllowHiding(boolean allowHiding)
method_53869(boolean arg0)
setCanLeave(boolean canLeave)
public boolean
keyPressed(KeyEvent event)
method_23924(class_11908 arg0)
keyPressed(KeyInput input)
public boolean
mouseScrolled(double scroll)
method_23921(double arg0)
mouseScrolled(double amount)
public boolean
mouseClicked(MouseButtonEvent event)
method_23922(class_11909 arg0)
mouseClicked(Click click)
public void
showSuggestions(boolean immediateNarration)
method_23920(boolean arg0)
show(boolean narrateFirstSuggestion)
public boolean
isVisible()
method_53867()
isOpen()
public Text
getUsageNarration()
method_53868()
getSuggestionUsageNarrationText()
public void
hide()
method_44931()
clearWindow()
private List<com.mojang.brigadier.suggestion.Suggestion>
sortSuggestions(com.mojang.brigadier.suggestion.Suggestions suggestions)
method_30104(com.mojang.brigadier.suggestion.Suggestions arg0)
sortSuggestions(com.mojang.brigadier.suggestion.Suggestions suggestions)
public void
updateCommandInfo()
method_23934()
refresh()
private static int
getLastWordIndex(String text)
method_23930(String arg0)
getStartOfCurrentWord(String input)
private static OrderedText
getExceptionMessage(com.mojang.brigadier.exceptions.CommandSyntaxException e)
method_30505(com.mojang.brigadier.exceptions.CommandSyntaxException arg0)
formatException(com.mojang.brigadier.exceptions.CommandSyntaxException exception)
private void
updateUsageInfo()
method_23937()
showCommandSuggestions()
private boolean
fillNodeUsage(ChatFormatting color)
method_23929(class_124 arg0)
showUsages(Formatting formatting)
private OrderedText
formatChat(String text, int offset)
method_23931(String arg0, int arg1)
provideRenderText(String original, int firstCharacterIndex)
private static String
calculateSuggestionSuffix(String contents, String suggestion)
method_23936(String arg0, String arg1)
getSuggestionSuffix(String original, String suggestion)
private static OrderedText
formatText(com.mojang.brigadier.ParseResults<ClientSuggestionProvider> currentParse, String text, int offset)
method_23925(com.mojang.brigadier.ParseResults<class_637> arg0, String arg1, int arg2)
highlight(com.mojang.brigadier.ParseResults<ClientCommandSource> parse, String original, int firstCharacterIndex)
public void
render(GuiGraphics graphics, int mouseX, int mouseY)
method_23923(class_332 arg0, int arg1, int arg2)
render(DrawContext context, int mouseX, int mouseY)
public boolean
renderSuggestions(GuiGraphics graphics, int mouseX, int mouseY)
method_44933(class_332 arg0, int arg1, int arg2)
tryRenderWindow(DrawContext context, int mouseX, int mouseY)
public void
renderUsage(GuiGraphics graphics)
method_44932(class_332 arg0)
renderMessages(DrawContext context)
public Text
getNarrationMessage()
method_23958()
getNarration()
private void
lambda$updateCommandInfo$0()
method_23939()
method_23939()